Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support layer operation: GoBackLayers, GotoBack, GotoFront #540

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

JiepengTan
Copy link
Contributor

issue: #512

Support layer operation: GoBackLayers, GotoBack, GotoFront

@JiepengTan JiepengTan requested a review from nighca March 25, 2025 09:58
@@ -466,10 +473,13 @@ func (p *Game) loadIndex(g reflect.Value, proj *projConfig) (err error) {
p.syncSprite = engine.NewBackdropProxy(p, p.getCostumePath(), p.getCostumeRenderScale())
p.setupBackdrop()
inits := make([]Sprite, 0, len(proj.Zorder))
for _, v := range proj.Zorder {
for layer, v := range proj.Zorder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As observed from here, sprite with larger layer covers sprite with smaller layer.

While it is opposite to the implementation below in goBackLayers, gotoFront, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix it

@JiepengTan JiepengTan force-pushed the pr_layer_operation branch from d82e22d to 2430446 Compare April 1, 2025 12:07
@JiepengTan JiepengTan requested a review from nighca April 1, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants