/// --------------------------------------------- /// Ultimate Character Controller /// Copyright (c) Opsive. All Rights Reserved. /// https://www.opsive.com /// --------------------------------------------- namespace Opsive.UltimateCharacterController.Networking.Traits { using UnityEngine; /// /// Defines an object that can take damage over the network using the Health component. /// public interface INetworkHealthMonitor { /// /// The object has taken been damaged. /// /// The amount of damage taken. /// The position of the damage. /// The direction that the object took damage from. /// The magnitude of the force that is applied to the object. /// The number of frames to add the force to. /// The radius of the explosive damage. If 0 then a non-explosive force will be used. /// The GameObject that did the damage. /// The Collider that was hit. void OnDamage(float amount, Vector3 position, Vector3 direction, float forceMagnitude, int frames, float radius, GameObject attacker, Collider hitCollider); /// /// The object is no longer alive. /// /// The position of the damage. /// The amount of force applied to the object while taking the damage. /// The GameObject that killed the character. void Die(Vector3 position, Vector3 force, GameObject attacker); /// /// Adds amount to health and then to the shield if there is still an amount remaining. Will not go over the maximum health or shield value. /// /// The amount of health or shield to add. void Heal(float amount); } }