public void StartWaves() { waveNumber = 0; currentPhase = WaveManagerPhase.Rest; Debug.Log("Start waves"); if (gameStartEvent != null) { gameStartEvent.Invoke(Waves.Length); } FinanceManager.AddCoin(startMoney); StartCoroutine("WaveQueueRoutine"); }
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); }
public void FastGather() { StopAllCoroutines(); FinanceManager.AddCoin(coinValue); Destroy(gameObject); }