コード例 #1
0
 public override void LoadContent(ContentManager content)
 {
     throwAnimation = new FiniteAnimation();
     image          = content.Load <Texture2D> ("secondary_attack");
     throwAnimation.LoadContent(content, image, new Vector2(5, 1), new Vector2(0, 0), 5);
     throwAnimation.Scale = 0.5f;
     throwAnimation.subscribe(this);
 }
コード例 #2
0
ファイル: Enemy.cs プロジェクト: Aardevarken/AnimalRampage
        public virtual void LoadContent(ContentManager content, InputManager inputManager, Vector2 position)
        {
            base.LoadContent(content, inputManager);
            this.position = position;
            Texture2D explode = content.Load <Texture2D> ("turtle_death");

            death = new FiniteAnimation();
            death.LoadContent(content, explode, new Vector2(6, 1), new Vector2(0, 0), 5);
            death.subscribe(this);
            death.Scale = 0.4f;
        }
コード例 #3
0
ファイル: Player.cs プロジェクト: Aardevarken/AnimalRampage
        public override void LoadContent(ContentManager content, InputManager inputManager)
        {
            input    = inputManager;
            position = new Vector2(0, 100);
            throwing = false;

            backpack = new List <Weapon> ();
            base.LoadContent(content, inputManager);

            image         = content.Load <Texture2D> ("bear_man_sprite_sheet");
            walkAnimation = new LoopingAnimation();
            walkAnimation.LoadContent(content, image, new Vector2(8, 5), new Vector2(0, 0), 7);
            throwAnimation = new FiniteAnimation();
            throwAnimation.LoadContent(content, image, new Vector2(8, 5), new Vector2(0, 1), 4);
            throwAnimation.subscribe(this);

            box = new Rectangle((int)position.X, (int)position.Y, walkAnimation.FrameWidth, walkAnimation.FrameHeight);
        }