Scoring
To display the score add a New Text Object to the TEMP layout.
To display the score add a New Text Object to the TEMP layout.
Call it TextFruit
Call it TextFruit
Give it the Tween behaviour
Give it the Tween behaviour
Give it the Flash behaviour
Give it the Flash behaviour
For the shadow of the Text add another Text Object to the TEMP layout
For the shadow of the Text add another Text Object to the TEMP layout
Call it TextFruitShadow
Call it TextFruitShadow
TextFruit properties as shown
TextFruit properties as shown
TextFruitShadow properties as shown
TextFruitShadow properties as shown
MAKE SURE THE ORIGIN POINT IS SET TO CENTER FOR TEXTFRUIT AND SHADOW!
MAKE SURE THE ORIGIN POINT IS SET TO CENTER FOR TEXTFRUIT AND SHADOW!
Merge games often have score multipliers
Merge games often have score multipliers
So when a fruit merges and then merges again quickly
So when a fruit merges and then merges again quickly
You get a much higher score.
You get a much higher score.
Add these global variables to help us calculate the score.
Add these global variables to help us calculate the score.
Time to introduce a GameManager object
Time to introduce a GameManager object
Add a new Sprite OUTSIDE the layout.
Add a new Sprite OUTSIDE the layout.
Call it GameManager
Call it GameManager
Use the GameManager image file you downloaded
Use the GameManager image file you downloaded
Add the Physics behaviour
Add the Physics behaviour
Make it immovable
Make it immovable
Add a Timer behaviour
Add a Timer behaviour
The Game Manager will:
The Game Manager will:
Set the world gravity
Set the world gravity
Now Fruit falls faster.
Now Fruit falls faster.
The Game Manager will also help us when calculating scores with bonus multipliers
The Game Manager will also help us when calculating scores with bonus multipliers