void FeedingTime() { //this script is a bit shit, it shoudl just bbe a trigger and then it's handled by everything else feedingTimer += Time.deltaTime; if (!foodBeenServed) { _door.OpenEyeSlot(); _door.OpenTraySlot(); if (feedingTimer > trayPushTime) { foodBeenServed = true; _tray.PushInside(); } } if (feedingTimer > maxFeedingTimer) { feedingTimer = 0; hasBeenFed = true; foodBeenServed = false; _door.CloseEyeSlot(); } }