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