Exemple #1
0
        public void Initialize()
        {
            InitializeGridManager();

            if (levelFileName == "TotalLevel.xml")
            {
                isTotalLevel = true;
            }
            treasureMgr.GetTreasureNum("level1.xml", out gottenTreasure, out totalTreasure);
            SelectPlantTexture();

            if (levelFileName == "novice.xml")
            {
                showHint = true;
                timeEmerging2 = intervalTime2;
                leftHint = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Hint.Left"), new Point(35, 32), 100, true);
                rightHint = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Hint.Right"), new Point(35, 32), 100, true);
            }
        }
 public override void LoadContent()
 {
     runAnimation = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Enemy.Run"),
         DEFAULT_FRAME_SIZE, 100, true);
     dieAnimation = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Enemy.Die"),
         DEFAULT_FRAME_SIZE, 100, false);
     this.currentAnimation = runAnimation;
     isAlive = true;
 }
 public override void LoadContent()
 {
     switch (type)
     {
         case BlockType.Floor:
             texture = Game.Content.Load<Texture2D>("texture/Object.Tile.Block.Wall");
             break;
         case BlockType.Ground:
             texture = Game.Content.Load<Texture2D>("texture/Object.Tile.Block.Ground");
             break;
         case BlockType.Wall:
             texture = Game.Content.Load<Texture2D>("texture/Object.Tile.Block.Wall");
             break;
         case BlockType.MovableBlock:
             texture = Game.Content.Load<Texture2D>("texture/Object.Tile.Block.MovableBlock2");
             movableBlock = new Animation(texture, new Point(64, 48), 100, true);
             break;
         default:
             texture = Game.Content.Load<Texture2D>("texture/Object.Tile.Block.Wall");
             break;
     }
 }
 public override void LoadContent()
 {
     displayAnimation = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Hint.DoorHint"),
         DEFAULT_FRAME_SIZE, 200, true);
     this.currentAnimation = displayAnimation;
     isDisplay = false;
 }
        /// <summary>
        /// Load resources
        /// </summary>
        public override void LoadContent()
        {
            idleAnimation = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Player.Idle"),
                DEFAULT_FRAME_SIZE, 100, true);
            runAnimation = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Player.Run"),
                DEFAULT_FRAME_SIZE, 100, true);
            jumpAnimation = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Player.Jump"),
                DEFAULT_FRAME_SIZE, 100, false);
            dieAnimation = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Player.Die"),
                DEFAULT_FRAME_SIZE, 100, false);
            climbAnimation = new Animation(Game.Content.Load<Texture2D>("texture/Object.Sprite.Player.Climb"),
                DEFAULT_FRAME_SIZE, 100, true);

            this.currentAnimation = idleAnimation;
            isAlive = true;
        }
Exemple #6
0
 public override void LoadContent()
 {
     this.animation = new Animation(Game.Content.Load<Texture2D>("texture/Object.StaticObject.Ogre.Core"),
         DEFAULT_FRAME_SIZE, 100, true);
     this.currentAnimation = animation;
 }