示例#1
0
 /// <summary>
 ///
 /// </summary>
 public HealthEventData(float delta, EntityEventHandler damager = null, Vector3 hitPoint = default(Vector3), Vector3 hitDirection = default(Vector3), float hitImpulse = 0f)
 {
     Delta        = delta;
     Damager      = damager;
     HitPoint     = hitPoint;
     HitDirection = hitDirection;
     HitImpulse   = hitImpulse;
 }
示例#2
0
        public void Launch(EntityEventHandler entityThatLaunched)
        {
            if (m_Launched)
            {
                Debug.LogWarningFormat(this, "Already launched this projectile!", name);
                return;
            }

            m_EntityThatLaunched = entityThatLaunched;
            m_Rigidbody.velocity = transform.forward * m_LaunchSpeed;
            m_Launched           = true;
        }
示例#3
0
        private void Awake()
        {
            m_ParentEntity = GetComponentInParent <EntityEventHandler>();
            if (!m_ParentEntity)
            {
                Debug.LogErrorFormat(this, "[This HitBox is not under an entity, like a player, animal, etc, it has no purpose.", name);
                enabled = false;
                return;
            }

            m_Collider  = GetComponent <Collider>();
            m_Rigidbody = GetComponent <Rigidbody>();
        }
示例#4
0
 private void On_CannibalDeath(EntityEventHandler cannibal)
 {
     m_AliveCannibals.Remove(cannibal);
 }
示例#5
0
 public Gunshot(Vector3 position, EntityEventHandler entityThatShot = null)
 {
     Position       = position;
     EntityThatShot = entityThatShot;
 }