示例#1
0
        void Reset()
        {
            EnemyAI ai = (EnemyAI)gameObject.GetComponent(typeof(EnemyAI));

            statesToMovements = new EnemyStateToMovement[ai.Info.Length];
            if (ai != null)
            {
                for (int i = 0; i < ai.Info.Length; i++)
                {
                    statesToMovements[i]       = new EnemyStateToMovement();
                    statesToMovements[i].state = ai.Info[i];
                }
            }
        }
 void Reset()
 {
     EnemyAI ai = (EnemyAI) gameObject.GetComponent (typeof(EnemyAI));
     statesToMovements = new EnemyStateToMovement[ai.Info.Length];
     if (ai != null) for (int i = 0; i <  ai.Info.Length; i++)
     {
         statesToMovements[i] = new EnemyStateToMovement();
         statesToMovements[i].state = ai.Info[i];
     }
 }