So i came from flash, and you all know we got that F8 button on flash that assigns a movieclip or a Sprite on stage with a class and we assign them their own personal variables inside the class. Anyone can share ideas how can i do it in OpenFL? like i want each of my enemies have their own different health and damages. Thanks.
That might answer it:
Nvm, didnt realized your double post
1 Like
Thank you, i figured it out, i called an Enemy Class extends as Sprite then spawns a Sprite of the enemy inside it.
var EC:EnemyClass
var EnemySprite:Sprite
addChild(EC)
EC.addChild(EnemySprite)
Solved.