Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def loadGameElements()
- {
- var bg;
- bg := new_GameElement(0,30);
- var anim := new_Animation("normal", 1,1,1);
- anim.addFrame("Images/mainstage.png");
- bg.addAnimation(anim);
- bg.changeAnimation("normal", FORWARD);
- this.addElement(bg);
- bg := new_GameElement(0,-70);
- bg.addAnimation(new_Animation("normal",1,"Images/plat_middle.png"));
- bg.changeAnimation("normal", FORWARD);
- this.addElement(bg);
- bg := new_GameElement(-110, -2);
- bg.addAnimation(new_Animation("normal",1,"Images/plat_side.png"));
- bg.changeAnimation("normal", FORWARD);
- this.addElement(bg);
- bg := new_GameElement(110, -2);
- anim := new_Animation("normal",1,"Images/plat_side.png");
- anim.mirror(true);
- bg.addAnimation(anim);
- bg.changeAnimation("normal", FORWARD);
- this.addElement(bg);
- }
- def loadPlatforms()
- {
- var plat;
- plat := new_Platform(PLATFORMTYPE_NORMAL, 0,112);
- plat.addAnimation(new_Animation("normal",1,"Images/main_plat.png"));
- plat.changeAnimation("normal", FORWARD);
- plat.setVisible(false);
- this.addPlatform(plat);
- plat := new_Platform(PLATFORMTYPE_GOTHROUGH, -46, -74, 92, 10);
- this.addPlatform(plat);
- plat := new_Platform(PLATFORMTYPE_GOTHROUGH, -154, -7, 90, 10);
- this.addPlatform(plat);
- plat := new_Platform(PLATFORMTYPE_GOTHROUGH, 66, -7, 90, 10);
- this.addPlatform(plat);
- }
- def loadHangPoints()
- {
- var hp;
- hp = new_HangPoint(LEFT,-212,68);
- this.addHangPoint(hp);
- hp = new_HangPoint(RIGHT,204,68);
- this.addHangPoint(hp);
- }
- def constructor()
- {
- this.setSpawnPoint(0, 0,0);
- this.setSpawnPoint(1, 115, -70);
- this.setSpawnPoint(2, -115, -70);
- this.setSpawnPoint(3, 0,-135);
- this.setSpawnPoint(4, 0, -35);
- this.bottomViewBorder = 276;
- this.topViewBorder = -276;
- this.leftViewBorder = -400;
- this.rightViewBorder = 400;
- this.topBorder = -420;
- this.setItemBoundaries(-200, -225, 200, 60);
- loadGameElements();
- loadPlatforms();
- loadHangPoints();
- this.setBackground("Images/bg.jpg");
- this.setBackgroundScale(1.45);
- this.setBackgroundType(STAGE_BG_FIXED);
- //this.setWireframeColor(COLOR_BLUE);
- //this.showWireframes(true);
- return this;
- }
- def destructor()
- {
- //
- }
- def Draw(g, gameTime)
- {
- base_Draw(g, gameTime);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement