コード例 #1
0
ファイル: Level1.cs プロジェクト: borgidiom/OdinsRevenge
        protected override void SecondEnemy()
        {
            Animation dayEnemey2WalkingAnimation = new Animation();
            Texture2D dayEnemey2WalkingTexture;

            Animation dayEnemy2AttackAnimation = new Animation();
            Texture2D dayEnemey2AttackTexture;

            Animation dayEnemey2DeathAnimation = new Animation();
            Texture2D dayEnemey2DeathTexture;

            dayEnemey2WalkingTexture = content.Load<Texture2D>("Enemy2\\Walking");
            dayEnemey2WalkingAnimation.Initialize(dayEnemey2WalkingTexture, Vector2.Zero, 52, 79, 4, 100, Color.White, 1f, true);

            dayEnemey2AttackTexture = content.Load<Texture2D>("Enemy2\\Attacking");
            dayEnemy2AttackAnimation.Initialize(dayEnemey2AttackTexture, Vector2.Zero, 71, 81, 6, 100, Color.White, 1f, true);

            dayEnemey2DeathTexture = content.Load<Texture2D>("Enemy2\\Dying");
            dayEnemey2DeathAnimation.Initialize(dayEnemey2DeathTexture, Vector2.Zero, 104, 84, 6, 200, Color.White, 1f, true);

            Vector2 startPosition = new Vector2();
            startPosition.X = -50;
            startPosition.Y = 440;

            enemy2 = new Enemy2();
            enemy2.Initialize(dayEnemey2WalkingTexture, startPosition, dayEnemy2AttackAnimation, dayEnemey2WalkingAnimation, dayEnemey2DeathAnimation, this);
            enemey2List.Add(enemy2);
        }
コード例 #2
0
ファイル: Level2.cs プロジェクト: borgidiom/OdinsRevenge
        protected override void SecondEnemy()
        {
            Animation dayEnemey2WalkingAnimation = new Animation();
            Texture2D dayEnemey2WalkingTexture;

            Animation dayEnemy2AttackAnimation = new Animation();
            Texture2D dayEnemey2AttackTexture;

            Animation dayEnemey2DeathAnimation = new Animation();
            Texture2D dayEnemey2DeathTexture;

            dayEnemey2WalkingTexture = content.Load<Texture2D>("Level2Enemy2\\Level2Enemy2Walking");
            dayEnemey2WalkingAnimation.Initialize(dayEnemey2WalkingTexture, Vector2.Zero, 60, 69, 4, 100, Color.White, 1f, true);

            dayEnemey2AttackTexture = content.Load<Texture2D>("Level2Enemy2\\Level2Enemy2Attacking");
            dayEnemy2AttackAnimation.Initialize(dayEnemey2AttackTexture, Vector2.Zero, 83, 72, 5, 100, Color.White, 1f, true);

            dayEnemey2DeathTexture = content.Load<Texture2D>("Level2Enemy2\\Level2Enemy2Death");
            dayEnemey2DeathAnimation.Initialize(dayEnemey2DeathTexture, Vector2.Zero, 95, 78, 6, 350, Color.White, 1f, true);

            Vector2 startPosition = new Vector2();
            startPosition.X = -50;
            startPosition.Y = 440;

            enemy2 = new Enemy2();
            enemy2.Initialize(dayEnemey2WalkingTexture, startPosition, dayEnemy2AttackAnimation, dayEnemey2WalkingAnimation, dayEnemey2DeathAnimation, this);
            enemey2List.Add(enemy2);
        }