Example #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");
 }
Example #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);
    }
Example #3
0
 public void FastGather()
 {
     StopAllCoroutines();
     FinanceManager.AddCoin(coinValue);
     Destroy(gameObject);
 }