Beispiel #1
0
 public void Move(int moveDistance)
 {
     transform.position += new Vector3(0, 0, moveDistance);
     if (!hasTriggeredNext && transform.position.z > weatherController.NextCloudZ)
     {
         hasTriggeredNext = true;
         weatherController.SpawnCloud();
     }
     else if (!wasCurrent && transform.position.z > weatherController.CurrentCloudZ)
     {
         wasCurrent = true;
         weatherController.SetCurrentCloud(this);
     }
     else if (transform.position.z > weatherController.DestroyCloudZ)
     {
         weatherController.DestroyCloud(this);
     }
 }