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; }
/// <summary> /// Trigger the respawn. /// </summary> override public void DoAction(RaycastCollider collider, RaycastCharacterController character) { character.SendMessage("Die", SendMessageOptions.DontRequireReceiver); }