Repository navigation
Release v5.7.0 - #43
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sprites load their costumes without a window, so sizes, costume switching,
hitboxes and clones can be checked in plain unit tests. Without a window,
timers stand at 0.
Variable monitors, like Scratch's "show variable":
showVariable("score", () -> score)on a stage or a sprite shows the name and the current value in the topleft corner of the stage, updated every frame, and
hideVariable("score")takes it away. A sprite's monitor says whose variable it is, for example "Cat:
lives".
The game can be paused, stepped and slowed down:
Window.getInstance().pause(),resume(),isPaused(),step()(one frame while paused) andsetGameSpeed(0.5)for half speed.run(), timers, gliding, animations andtimed speech bubbles all follow, so the whole game stands still or runs in slow
motion while the window keeps drawing; keys and clicks still arrive, so a key
can resume the game.
Timer.millis()andgetDeltaTime()count game time,which is the real time as long as the game is neither paused nor sped up.
Clones work like Scratch's.
clone()makes a clone of the same class (a cloneof a
Catis aCat, with a copy of its variables), puts it on the stage rightbehind the original and runs its new
whenStartsAsClone(), "when I start as aclone".
deleteThisClone()removes a clone and leaves the original alone, andisClone()tells them apart.Before,
clone()returned a plainSpritethat was not on the stage, so itneither showed up nor ran the class's
run(). A copy made withnew Sprite(other)also drew with the other sprite's pen; it has its own now.