Hi guys. This is my first time doing this because we are making a thesis for a certain game to android phone. And I was wondering if, instead of a Scoring System using integers, we change it into a certain requirements. I can’t put on into words so, here’s the picture:
Your going to have to create a Class that keeps track all the objects that a player gets. You would then add a Method in that class that could return true/false if I sent it a number and object type.
Your ScoreSystem / Level Manager would then just run down its list of requirements and Ask the class if the player has 2 food or 1 Water, etc. If it gets all trues then go to the next level. If it gets a false, pop up the failure,restart level screen
This would greatly depend on how you implement the game. I assume someone is going to be coding how to randomly put items out on this screen, and code moving the guy around to grab items. Keeping track of items grabbed?
This would be the code you’d have to change for your game:
void CheckGameOver()
{
// specifically this if statment
if (score >= targetScore) {
Time.timeScale = 0;
youWon.SetActive (true);
} else
{
Time.timeScale=0;
gameOver.SetActive(true);
}
}
But what you change it to is what is dependent on the REST of the code of your game. Without knowing more about that and how your coding (or how you will code it) you can’t do this part. I only made assumptions before about how the game works. That there is a guy moving around with a hook grabbing things. Who is going to be in charge of coding the game?
How will you generate objects on the screen when a level starts?
How will you move the guy around and work his hook?
What happens if he catches item, how do you plan on removing it from the screen and keep track they got that particular item?
Once those items are finished and coded, making the scoring and Level end will be a much easier thing to do. If that stuff is already coded, some answers as to how objects are handled would need to be answered to help you change the CheckGameOver function