Exemplo n.º 1
0
    private void Land()
    {
        isFalling = false;
        if (fallSpeed <= minSpeedForAction)
        {
            switch (fallDamageAction)
            {
            case FallDamageAction.STUN: controller.Stun(stunTime); break;

            case FallDamageAction.SEND_MESSAGE_DIE: controller.SendMessage("Die", null, SendMessageOptions.DontRequireReceiver);  break;

            case FallDamageAction.SEND_MESSAGE_HIT: controller.SendMessage("Hit", fallSpeed, SendMessageOptions.DontRequireReceiver); break;

            case FallDamageAction.SIMPLE_HEALTH_DAMAGE: controller.GetComponent <SimpleHealth>().FallDamage(fallSpeed); break;
            }
        }
        fallSpeed = 0.0f;
    }
Exemplo n.º 2
0
 /// <summary>
 /// Trigger the respawn.
 /// </summary>
 override public void DoAction(RaycastCollider collider, RaycastCharacterController character)
 {
     character.SendMessage("Die", SendMessageOptions.DontRequireReceiver);
 }
Exemplo n.º 3
0
	/// <summary>
	/// Trigger the respawn.
	/// </summary>
	override public void DoAction(RaycastCollider collider, RaycastCharacterController character) {
		character.SendMessage("Die", SendMessageOptions.DontRequireReceiver);
	}