示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (Time.frameCount % 4 == 0 && onGoingProject)
     {
         CheckBars();
         if (AllBarsAreDone())
         {
             onGoingProject = false;
             resourcesManager.AddGold(Mathf.RoundToInt(currentGoldReward * AbilityManager.instance.GoldMultiplier));
             if (isGameJam)
             {
                 resourcesManager.GameJamDone();
             }
             OnTaskDone?.Invoke();
             spawnerScript.RequestNewProject();
         }
     }
 }