public override void Enter(Entity context)
 {
     transform = context.transform;
     direction = context.GetMedrashPosition() - transform.position;
     direction.y = 0.0f;
     context.SetSpeed(context.GetBaseSpeed()*1.5f);
     context.SetDirection(direction);
 }
Example #2
0
 public override void Enter(Entity context)
 {
     context.SetSpeed(0.0f);
     context.MakeInvunerable();
     context.SetDyingAnimation();
     if (context.blood)
         GameObject.Instantiate(context.blood, context.transform.position + Vector3.up*1.5f, context.transform.rotation);
 }
 public override void Enter(Entity context)
 {
     context.SetSpeed(context.GetBaseSpeed());
     float r = Random.value;
     rotateAngle = 120.0f*(2*r - 1)*Mathf.PI/180.0f;
     if (r < 0.4)
         context.RotateBy(rotateAngle);
     else if (r < 0.8)
         context.RotateBy(-rotateAngle);
     direction = context.transform.forward;
     direction.y = 0.0f;
     context.SetDirection(direction);
 }
 public override void Enter(Entity context)
 {
     context.SetSpeed(context.GetBaseSpeed());
 }
 public override void Enter(Entity context)
 {
     context.SetSpeed(8.0f);
 }
Example #6
0
 public override void Enter(Entity context)
 {
     context.SetSpeed(0.0f);
     context.SetAttackAnimation();
 }
Example #7
0
 public override void Enter(Entity context)
 {
     context.SetSpeed(context.GetBaseSpeed());
     context.SetRunAnimation();
 }