예제 #1
0
        public Enemy SpawnEnemy(EnemyType newType, Vector2 position)
        {
            Enemy newEnemy = null;
            switch (newType)
            {
                case(EnemyType.Slicer):
                    newEnemy = new Slicer(manager.thisScene, position);
                    break;
                case (EnemyType.Tortoise):
                    newEnemy = new Tortoise(manager.thisScene, position);
                    break;
                case (EnemyType.Dragonfly):
                    newEnemy = new Dragonfly(manager.thisScene, position);
                    break;
                case (EnemyType.Komodo):
                    newEnemy = new Komodo(manager.thisScene, position);
                    break;
                case (EnemyType.Phantom):
                    newEnemy = new Phantom(manager.thisScene, position);
                    break;
                default:
                    break;
            }

            return newEnemy;
        }
예제 #2
0
        public Enemy SpawnStrafingSlicer(Vector2 position, float rotation, float startVelocity = 35f, float endVelocity = 50f)
        {
            Enemy e = new Slicer(manager.thisScene, position);
            e.DrawAtTrueRotation = true;
            e.Rotation = rotation;
            e.Velocity = startVelocity;
            e.LerpVelocity(endVelocity, 5f);

            return e;
        }