Code 4

Step 1

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.

Screen Shot 2017-04-05 at 10.17.30.png

Screen Shot 2017-04-05 at 10.17.38.png

Screen Shot 2017-04-05 at 10.17.48.png

Step 2

All the models are now in:
Screen Shot 2017-04-05 at 10.19.04.png

Normals are being calculated so that the models look smooth

Screen Shot 2017-04-05 at 10.19.47.png

They have been renamed

Screen Shot 2017-04-05 at 10.19.08.png

And the bits to be coloured have been re-named to:

  • Body
  • Skirt
  • Hat

Screen Shot 2017-04-05 at 10.19.22.png

So now they are all being coloured

Screen Shot 2017-04-05 at 10.19.29.png

In the playerX script:

  • Player Script
  • Movement Script
  • Collect Script
  • An Animator
  • Animation script

Screen Shot 2017-04-05 at 10.19.15.png

Step 3

Setting up the input axis, there are 4 buttons:

  • Move (x and y)
  • Collect
  • Heal
  • Mix

I am going to use the naming convention, for each character:

  • <numberOfPlayer><nameOfCommand>
  • 1x
  • 1y
  • 1collect
  • 1heal
  • 1mix
  • 2x
  • 2y
  • etc…

 

I do not have 4 switch controllers, but I am going to pretend I do…

Step 4

Adding in the axes

Screen Shot 2017-04-05 at 10.42.20.png

Step 5

Writing in the vertical/horizontal/collect instructions.

Screen Shot 2017-04-05 at 10.45.14.png

Step 6

Adding vertical/horizontal instruction to the animator script.

Screen Shot 2017-04-05 at 10.45.08.png

It would be good to have this script get the information from movement… but maybe later!

Screen Shot 2017-04-05 at 10.47.20.png

Step 7

Changing some camera values, to make it feel smooth.

Screen Shot 2017-04-05 at 10.56.54.png

Step 8

Time for the collect script!

Screen Shot 2017-04-05 at 10.57.37.png

So far it has this:

Screen Shot 2017-04-05 at 10.57.52.png

Step 9

Add lantern colour in player Awake to “NON”

Screen Shot 2017-04-05 at 11.00.08.png

Step 10

The collect script

 

Screen Shot 2017-04-05 at 11.16.01.png

Step 11

Adding in the GetLantern and SetLantern in the player script, so that the collect script works.

Screen Shot 2017-04-05 at 11.16.14.png

Step 12

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.

Screen Shot 2017-04-05 at 12.13.08.png

Step 13

There is a delegate function in the collect script that triggers the Assign Colour in the TileManager.

Screen Shot 2017-04-05 at 12.15.02.png

These are the important bits from this code!

 

 

Step 14

Adding in a temporary lantern.

Making it a prefab

Step 15

The UpdateLantern Script, is called when a colour has been collected

Screen Shot 2017-04-05 at 13.41.44.png

Adding in the collect.collected – needs to Update Lantern.

Screen Shot 2017-04-05 at 13.41.58.png

What it looks like now:
Screen Shot 2017-04-05 at 13.43.50.png

Step 16

The heal mechanics…

Creating a script, attaching it to the players.

 

Step 17

All the Heal!!

  • Checks if the player collides with:
    • An other player
    • A Hamsa
  • And then heals them.

Screen Shot 2017-04-05 at 17.27.40.png

Step 18

The Hamsa script, things I have added to make the ‘healing’ work

  • Hamsa’s change colour when they have been healed

Screen Shot 2017-04-05 at 17.29.22

Screen Shot 2017-04-05 at 17.29.35.png

Step 19

Reassign Player Colours – using the player Manager

Screen Shot 2017-04-05 at 17.32.21.png

Step 20

Reassign Colours in the tile Manager

Screen Shot 2017-04-05 at 17.32.33.png

Step 21

Some test game play footage!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s