UBC-BEST / M2M-Pizza-Game-Unity

Pizza game for the M2M app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Topping control

wesleychchan opened this issue · comments

Instead of having different pizza sprites, spawn toppings onto the pizza
When corresponding key is pressed, generate (20) toppings, some min distance apart and randomly placed on the pizza
Then, constrain the movement of all the toppings to the pizza so that they follow its position and rotation as it moves off the screen
Topping object should use a new script that replace the InputControl(), SpriteControl(), and GetSpriteNumber() from PizzaScript
All the bools for toppings must be removed from the PizzaScript too, which will change order checking for GameManagerScript
Try to implement this as efficiently as possible; despawn toppings when they aren't being used

Toppings have been roughly implemented. Next steps:

  • Right now, the scoring is looking at the spriteNumber of the pizza, which will no longer be good since we only have one pizza sprite now. We need to change how the scoring system compares the toppings to the order.
  • Make the toppings actually spawn on the pizza and not in a box around the pizza.
  • Don't allow for spawning of more than one set of the same topping at a time (i.e. you cannot press 'P' twice and get 40 pepperonis).
  • Constrain the movement of the toppings to the pizza.
  • Destroy toppings once pizza is off screen.
  • Figure out a better way to spawn the specific toppings instead of a switch case and separate prefabs. Maybe build 4 prefab variants instead and switch between those, maybe that would cut down on lines of code.