Open itsamedood opened 2 years ago
I saw FlxScene and thought I would try it, but I'm not quite sure how to rotate a sprite that is inside the xml file.
xml
Here's the xml file:
<?xml version="1.0" encoding="utf-8"?> <scene width="1000" height="1000" bgColor="black" name="splash_screen" description="Plays on boot." version="1.0"> <layer id="bg"> <sprite graphic="assets/images/game/bg.png" x="320" y="120" width="2000" height="1500" /> </layer> <layer id="main"> <sprite graphic="assets/images/logos/me.png" x="384" y="-46" width="200" height="200" /> <text id="meText" text="itsamedood" x="504" y="326.5" color="white" size="50" font="assets/fonts/hey_comic.ttf" /> </layer> </scene>
What I want is to rotate the sprite on the layer bg (line 5) by 0.03 every second using the update method, but how do I access the bg sprite from the xml file?
0.03
I saw FlxScene and thought I would try it, but I'm not quite sure how to rotate a sprite that is inside the
xml
file.Here's the xml file:
What I want is to rotate the sprite on the layer bg (line 5) by
0.03
every second using the update method, but how do I access the bg sprite from the xml file?