博文

Part: Export User Test

The game is basically finished Export the game file and wait for user test. Question: When exporting, it was found that the game window could not be performed in accordance with the 1080*1920 size, and it was always landscape screen. The solution: Adjust the position of the UI in the game and specify the size of the window in which the game runs.

Part: Shop System

Question: After the item is purchased by the store, the button displayed is still use, and the purchase can be repeated Solution: Needs to be detected. If the item has been unlocked, return directly in the registration event of the button, and do not execute the subsequent deduction code. For a better understanding, the button needs to be hidden to indicate that it is unlocked.

Part:Shop System

Shops sell catching tools and food: Use list to store them and initialize them. When the player buys the corresponding item, the corresponding bool value is set to true. When using the corresponding item, it needs to detect whether it is unlocked. If it is unlocked, it can be used normally, otherwise, the subsequent code will not be executed to achieve the restricted use. Question: The order in the list collection is not clear when archiving, resulting in archiving confusion Solution: Comment the code and set the event correctly in the button in the scene. Make the point of the game useful, and the coherence of the game is improved.

Part: Filling System

图片
Reconstruct archive information, Using this class as the data for a single cat, all cats are stored in a list set, replacing the previous archive information for all cats with the SaveCat data type. In this way, the information of the cat in the start game, operating room, return screen, minigame end screen and minigame is fully stored. Ensure the fluency and rationality of the game. Added automatic archiving function, when the cat information changes, the previous manual archiving method is called. Prevents players from forgetting to save resulting in loss of game data. Solution: The class can be parsed and stored by [System.Serializable].

Part: Filing System

Perfect cat archive with cat's name, community number, weight, number of teeth, pregnancy, gender information Question: PlayerPrefs can only archive simple data types, not classes

Part: Minigame 3

Random speed creation, using the random.rangef method provided by unity to create a random speed (within a certain range) every time the slider is reset. Question: Random speed is sometimes too slow or too fast. Solution: Limit the range value of random velocity.

Part:Minigame 3

Add color to the game's sliders, the bottom layer is red, the top layer is green, and when the sliders move to the bottom, they appear all red, telling the player the danger. Question: The speed of the slider is not random and the gameplay is poor.