Repository navigation
Release v6.0.0 - #51
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.
TiledMap.spawn("Objects")creates a sprite for each object of a layer whosetype (Tiled's "class") is the name of a sprite class, puts it where the object
is and adds it to the stage. Objects drawn as areas give their sprite that area
as its hitbox. The sprite class needs a constructor taking the
MapObject, onetaking
(double x, double y), or one without parameters.A sprite that only draws with its pen no longer shows the red "?" marker for a
missing costume. The marker (and its warning) now appears only for a sprite that
stays without a costume, a hitbox and a used pen for a second.
Editors can show a preview of a stage: started with
-Dscratch4j.preview=<folder>, a program draws the first frame of its stage,saves it as
frame.pngwith the sprites described instage.json, and ends.-Dscratch4j.preview.stage=<Class>previews another stage, and-Dscratch4j.preview.omit=<fields>leaves the sprites in those fields out ofthe picture.
💥 BREAKING CHANGE: A stage no longer opens the window itself. Create the window
first and put the stage into it:
new Stage(width, height)andnew Stage(width, height, assets)are gone: astage is always as big as the window it is shown in, so the size (and the assets
folder) go to
new Window(...). Removesuper(width, height)from your stages.A stage made before there is a window says how to fix it, and a window nobody
put a stage into says so too.