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
// In the Main class : | |
public function Main() { | |
state = new TiledMapGameState(); | |
setTimeout(otherState, 4000); | |
} | |
private function otherState():void { |
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
// The AGameData class is an abstract (it should be extend) and dynamic class (you won't have problem | |
// to access its chidren properties, be careful your IDE may not indicate children properties). | |
public class MyGameData extends AGameData { | |
public function MyGameData() { | |
super(); | |
_levels = [[Level1, "levels/A1/LevelA1.swf"], [Level2, "levels/A2/LevelA2.swf"]]; | |
} |
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
// In your GameState class extending StarlingState (working for State and Away3DState too). | |
override public function initialize():void { | |
super.initialize(); | |
// The group property specifies the depth sorting: objects placed in group 1 will be behind objects placed in group 2. | |
// Here both objects have the same group, therefore the first added will be behind the second. | |
var cs1:CitrusSprite = new CitrusSprite("cs1", {x:100, y:100, group:5, view:new Quad(100, 100, 0xFF0000)}); | |
add(cs1); | |
OlderNewer