Skip to content

How do i acces classes that are in source #574

Answered by NexIsDumb
Slaus890 asked this question in Q&A
Discussion options

You must be logged in to vote

the problem is that if i wanna change the y of menuitem like for (i => menuItem in weekSprites.members) { menuItem.y = 100; } the y goes back to the original point because MenuItem class has y = CoolUtil.fpsLerp(y, (targetY * 120) + 480, 0.17); is there a way i can change targetН without making a custom class? if there isn`t i need to create a script data/scripts/MenuItem.hx and write class MenuItem extends FlxSprite { var targetY = 100; } or smth right?

then change the y on postUpdate() instead of create()

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@NexIsDumb
Comment options

@NexIsDumb
Comment options

@Slaus890
Comment options

@NexIsDumb
Comment options

Answer selected by Slaus890
@Slaus890
Comment options

@NexIsDumb
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants