//Constructor initializes only object fields
        public Animal(string view, int feedTimeOut, AnimalTimer animalTimer)
        {
            View        = view;
            FeedTimeOut = feedTimeOut;
            AnimalTimer = animalTimer;

            //Setting the timer of hunger
            AnimalTimer.SetHungryTimer(this);
        }
Beispiel #2
0
 public void StartTimer(DbContextOptions <AnimalsGameContext> options)
 {
     this.AnimalTimer = new AnimalTimer(this.AnimalId, options, (int)Type + 1);
 }