コード例 #1
0
 private void OnSpawnMore(FMDay day)
 {
     if (cumulativeCount <= maxFish)
     {
         for (int i = 0; i < numberToSpawn; i++)
         {
             Vector3    offset = Vector3.Scale(Random.insideUnitSphere, randomPosRange);
             GameObject go     = Instantiate(prefab, parent.position + offset, parent.rotation, parent);
             go.name = "spawn" + (cumulativeCount + i);
             go.GetComponent <FMWorker>().GoToWorkerPool();
         }
         cumulativeCount += numberToSpawn;
     }
 }
コード例 #2
0
 public void OnDayStart(FMDay day)
 {
     m_CurrentSicknessLevel = 0f;
 }
コード例 #3
0
 void Awake()
 {
     m_day = FMGameLoopManager.GetOrCreateInstance().m_CurrentDay;
 }
コード例 #4
0
 public void OnEveningStart(FMDay day)
 {
     m_AssignedWorkers.Clear();
     ShutDown();
     // might need animations to stop functioning
 }
コード例 #5
0
 public void OnDayEnd(FMDay currentDay)
 {
     GoHome();
 }
コード例 #6
0
 public void OnEveningStart(FMDay currentDay)
 {
     GetSomeGrub();
 }
コード例 #7
0
 public void OnDayEnd(FMDay currentDay)
 {
     // shut down the worker pool
 }
コード例 #8
0
 public void OnDayStart(FMDay currentDay)
 {
     // open up the worker pool game object for business
 }