Esempio n. 1
0
 private void Start()
 {
     status = SeedStatus.Idle;
     player = PlayerCtroller.Instance.gameObject.transform;
 }
 void Game_DayIncrimented(object sender, EventArgs e)
 {
     if (this.Age < this.MaxAge)
     {
         this.MoistureLevel += this.MoistureAbsorbtionRate;
         if (this.MoistureLevel > 1)
         {
             this.OnGerminated(new SeedGerminatedEventArgs() { Plant = this.Plant });
             this.Status = SeedStatus.Germinated;
         }
     }
     else
     {
         this.Status = SeedStatus.Dead;
     }
     this.Age++;
 }