예제 #1
0
        public static Enemy create(Type type, ref Vector3 position, ref Quaternion rotation)
        {
            Enemy enemy = Enemy.create();

            enemy.phase_ = Phase.Alive;
            enemy.init();
            switch (type)
            {
            case Type.None:
                Debug.Assert(false);
                break;

            case Type.Zako:
                enemy.zako_init(ref position, ref rotation);
                break;

            case Type.Dragon:
                enemy.dragon_init(ref position, ref rotation);
                break;
            }
            return(enemy);
        }
예제 #2
0
        public static Enemy create(Type type)
        {
            Enemy enemy = Enemy.create();

            // enemy.type_ = type;
            enemy.phase_ = Phase.Alive;
            enemy.init();
            switch (type)
            {
            case Type.None:
                Debug.Assert(false);
                break;

            case Type.Zako:
            {
                var position = new Vector3(MyRandom.Range(-15f, 15f), MyRandom.Range(-6f, 6f), -100f);
                enemy.zako_init(ref position, ref CV.QuaternionIdentity);
            }
            break;

            case Type.Zako2:
            {
                var position = new Vector3(MyRandom.Range(-6f, 6f),
                                           MyRandom.Range(-6f, 6f),
                                           MyRandom.Range(194, 198f));
                enemy.zako2_init(ref position, ref CV.Quaternion180Y);
            }
            break;

            case Type.Dragon:
            {
                enemy.dragon_init();
            }
            break;
            }
            return(enemy);
        }