Example #1
0
    private void AddAgent()
    {
        GolfAgent ga = GameObject.Instantiate <GolfAgent>(golfAgentPrefab);

        ga.character.transform.position = agentSpawnPoint.position;
        ga.SetupAgent(this);
        agents.Add(ga);
    }
Example #2
0
 public void RemoveAgent(GolfAgent a)
 {
     agents.Remove(a);
     GameObject.Destroy(a.gameObject);
     if (agents.Count == 0)
     {
         curWave++;
         SetMoney(curMoney + totalScore * 10);// - (hole.par * totalFinished) * 10)
         //GetMoneyFromWaveAndReset();
         ChangeState(STATE.BUILD);
     }
 }