コード例 #1
0
        private EnemySpaceShip SpawnEnemyUnit()
        {
            GameObject     spawnedEnemyObject = _enemySpawner.Spawn();
            EnemySpaceShip enemyShip          = spawnedEnemyObject.GetComponent <EnemySpaceShip>();

            if (enemyShip != null)
            {
                enemyShip.SetMovementTargets(_enemyMovementTargets);
            }
            return(enemyShip);
        }
コード例 #2
0
        private EnemySpaceShip SpawnEnemyUnit()
        {
            EnemySpaceShip enemyShip = enemySpawner.Spawn().
                                       GetComponent <EnemySpaceShip>();

            if (enemyShip != null)
            {
                enemyShip.SetMovementTargets(enemyMovementTargets);
            }

            return(enemyShip);
        }