コード例 #1
0
    private void SpawnNewEnemy(int enemy, Lane lane)
    {
        GameObject newEnemy         = Instantiate(enemyModels[enemy], GetPosition(lane), Quaternion.identity, enemyList.transform);
        Airship    newEnemyRenderer = newEnemy.GetComponent <Airship>();

        lane.SetAirship(newEnemyRenderer);
        enemyList.AddEnemy(newEnemyRenderer);
        newEnemyRenderer.SetManagingObjects(metalManager, enemyList);
    }
コード例 #2
0
 private void Start()
 {
     //Adds itself to the global enemy list.
     EnemyList.AddEnemy(this);
     area = gameObject.GetComponent <SpriteRenderer>();
 }