예제 #1
0
	public void assignNewTarget(){
		//This function should assign the Game Controller's Enemy Prefab to newTarget.
		if (enemyInstance == null) {
			if (enemyList.Count > 0) {
				Debug.Log("assigning new target");
				enemyInstance = enemyList [0];
				enemyInstance.gameObject.SetActive (true);
				enemyList.RemoveAt (0);
			}else{
			//end fight
				Debug.Log("Fight Ends");
			}
		}
	}
예제 #2
0
	public void createNewEnemy(TestTankScript newEnemy){
//		This function should create a new enemy and keep it contained within EnemyObjects, as it should
//		default to doing.
		TestTankScript nextEnemy = Instantiate(newEnemy);
		//add enemy to list
		enemyList.Add(nextEnemy);
	}