Ejemplo n.º 1
0
 public void StartWaves()
 {
     waveNumber   = 0;
     currentPhase = WaveManagerPhase.Rest;
     Debug.Log("Start waves");
     if (gameStartEvent != null)
     {
         gameStartEvent.Invoke(Waves.Length);
     }
     FinanceManager.AddCoin(startMoney);
     StartCoroutine("WaveQueueRoutine");
 }
Ejemplo n.º 2
0
    private IEnumerator GoToDaddy()
    {
        float time = Time.time;

        coinPosition = transform.position;
        while (Time.time - time < timeToMove)
        {
            transform.position = VectorLerp(coinPosition, playerPosition, (Time.time - time) / timeToMove);
            yield return(null);
        }
        FinanceManager.AddCoin(coinValue);
        Destroy(gameObject);
    }
Ejemplo n.º 3
0
 public void FastGather()
 {
     StopAllCoroutines();
     FinanceManager.AddCoin(coinValue);
     Destroy(gameObject);
 }