Esempio n. 1
0
        public static void ApplyDamage(GameObject _obj, float _quantity, Vector2 _force = default(Vector2), eDmgType _type = eDmgType.NORMAL)
        {
            DamageData damageData = new DamageData()
            {
                Quantity = _quantity, Force = _force, Type = _type
            };

            damageData.ApplyDamage(_obj);
        }
Esempio n. 2
0
 void OnTriggerStay(Collider other)
 {
     if (IsDestroyOnCollision && other.attachedRigidbody && (other.gameObject.layer != gameObject.layer))
     {
         //apply damage here
         DamageData.ApplyDamage(other.attachedRigidbody.gameObject, DamageQty, Dir);
         Destroy(gameObject);
     }
 }
Esempio n. 3
0
 public static void ApplyDamage( GameObject _obj, float _quantity, Vector2 _force = default(Vector2), eDmgType _type = eDmgType.NORMAL )
 {
     DamageData damageData = new DamageData(){ Quantity = _quantity, Force = _force, Type = _type };
     damageData.ApplyDamage( _obj );
 }