Thursday, 24 October 2013

Better architecture!

So the system looks better! MUCH BETTER!

A better way of implementing the Entity Component system

Added 2 new scripts

1. CollisionDetector - This will be attached to the hands, legs and any body part of the player which needs collision.

this has 2 variables -
      *. delegateGameObject - this will be the game object to which it should report saying that something has hit. So example, If the script is running on the left hand, and if the left hand hits an enemy's head, it will tell the delegateGameObject(we are intending to make this "Player") that left hand has hit enemy's head
     *. bodyPart - An enum that holds the type of body part it is attached to


2. CollisionHandler - This will be attached to the player and will take all the calls from collisionDetector and will be responsible for the decisions that is to be taken once the collision has happened.

Now this is really generic!!! Whew!!!!

Wednesday, 16 October 2013

Enemy reaction basics

Have added an enemy,

And the player hits him, the enemy reacts.......as if it is hurt......

The enemy also now looks at the player all the time........

Here is a video :-


Tuesday, 15 October 2013

First punch and kick


Have set up a basic combat animation system.

'Z' for punch
'X' for kick

The player can now turn sideways as well...
Here is a video below


Thursday, 10 October 2013

Layer masks in mecanim

So,

Thats it with the layer masks with the mecanim. Phew!!!!

I took 2 animations. First one was sneak animation from unity asset store. Second one was an animation that created with the player in a fight mode.

I used the sneak animation as the base layer, and the fight animation on a layer mask only for the torso. Now we get the player walking with his fists pumping, ready to punch away!


Check the test video below


Wednesday, 9 October 2013

Intro

Guys,

Am starting to blog about what I am doing with my combat game.