//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); }
public void StartTimer(DbContextOptions <AnimalsGameContext> options) { this.AnimalTimer = new AnimalTimer(this.AnimalId, options, (int)Type + 1); }