Setting up the camera to zoom out as the players move apart. I had this scrip in the last version, so I shall just copy it across.
All the models are now in:
Normals are being calculated so that the models look smooth
They have been renamed
And the bits to be coloured have been re-named to:
So now they are all being coloured
In the playerX script:
- Player Script
- Movement Script
- Collect Script
- An Animator
- Animation script
Setting up the input axis, there are 4 buttons:
- Move (x and y)
I am going to use the naming convention, for each character:
I do not have 4 switch controllers, but I am going to pretend I do…
Adding in the axes
Writing in the vertical/horizontal/collect instructions.
Adding vertical/horizontal instruction to the animator script.
It would be good to have this script get the information from movement… but maybe later!
Changing some camera values, to make it feel smooth.
Time for the collect script!
So far it has this:
Add lantern colour in player Awake to “NON”
The collect script
Adding in the GetLantern and SetLantern in the player script, so that the collect script works.
Now that a colour has been removed from the tile, a new colour needs to appear on the floor (this cannot be the same colour as any on the floor, or any colour being held in the lantern). This is a tile Manager job.
There is a delegate function in the collect script that triggers the Assign Colour in the TileManager.
These are the important bits from this code!
Adding in a temporary lantern.
Making it a prefab
The UpdateLantern Script, is called when a colour has been collected
Adding in the collect.collected – needs to Update Lantern.
What it looks like now:
The heal mechanics…
Creating a script, attaching it to the players.
All the Heal!!
- Checks if the player collides with:
- An other player
- A Hamsa
- And then heals them.
The Hamsa script, things I have added to make the ‘healing’ work
- Hamsa’s change colour when they have been healed
Reassign Player Colours – using the player Manager
Reassign Colours in the tile Manager
Some test game play footage!