Apress / Devel-2D-Games-Unity

Source Code for 'Developing 2D Games with Unity: Independent Game Programming with C#' by Jared Halpern
https://www.apress.com/us/book/9781484237717
Other
215 stars 53 forks source link

Game Win Streaks 2D Unity Code #46

Closed ghost closed 3 years ago

ghost commented 3 years ago

How do I create a code that causes win streaks to lead to a power up.For example,if player 1 scores 3 goals,Player 1 gets a power up?

JaredHalpern commented 3 years ago

@slysken - keep track of the number of goals inside the Player Object with a variable. When the number reaches a certain amount, give them a power up (however you'd like).