Guest User

Untitled

a guest
Apr 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. package
  2. {
  3. import net.flashpunk.FP;
  4. public class GC
  5. {
  6. [Embed(source = "assets/assassin.png")]
  7. public static const PLAYER:Class;
  8.  
  9.  
  10.  
  11. [Embed(source = "assets/soldier spear.png")]
  12. public static const SOLDIER1:Class;
  13. [Embed(source = "assets/soldier spear 2.png")]
  14. public static const SOLDIER2:Class;
  15. [Embed(source = "assets/soldier spear 3.png")]
  16. public static const SOLDIER3:Class;
  17.  
  18. private var enemySprite:Spritemap;
  19.  
  20. [Embed(source = 'assets/mountains.png')]
  21. public static const BACKGROUND:Class;
  22.  
  23. public static const ENEMY_SPEED:Number = 5;
  24.  
  25. public static const ENEMY_SPAWN_CHANCE:Number = 0.95;
  26.  
  27. public static const jumpDist:int = 112;
  28.  
  29. public static const trenchDist:int = 165;
  30.  
  31. public static const TYPE_ENEMY:String = "enemy";
  32.  
  33. public function GC() {
  34. public static var soldierNum:int = FP.rand(4);
  35.  
  36. if (soldierNum == 0){
  37. enemySprite = new Spritemap(SOLDIER1,13,26);
  38. }else if (soldierNum == 1) {
  39. enemySprite = new Spritemap(SOLDIER2,13,26);
  40. }else {
  41. enemySprite = new Spritemap(SOLDIER3,13,26);
  42. }
  43. }
  44.  
  45. }
  46.  
  47. }
Add Comment
Please, Sign In to add comment