Hi guys,
hope someone can help me with this.
So basically I have a guy working a farm, producing 1 food ever 2 seconds.
the way this is set up is basically this: if the farm is empty -> call a function to make minions go to . on collision with it, the minion sprite is destroyed, and a value of 1 is added to farm's instance variable. when the value of 3 is reached, the function changes the behavior of the minions, so they would not be interested in it any longer.
when the first minion enters the farm, 1 is added to farm's instance variable and also a boolean "isInhabited" set to true.
the problem is that I have tried to make it so when there is only 1 guy working to add 1 to the global variable "food" ever 2 seconds, when 2 guys are working, i wanted to add 5 to food every 2 seconds or when farm's boolean "isFull" is set to true (meaning 3 farmers), to add 12 to food every 3 seconds.
don't think i'm skilled enough to think this one through. here's an image with the best idea i've had so far..
hopefully someone can illuminate me!