Пример #1
0
 private void InputTest()
 {
     if (Input.GetKeyDown(KeyCode.V))
     {
         m_CombatProps.addDamage(AttackType.Frozen, 500);
     }
     if (Input.GetKeyDown(KeyCode.B))
     {
         if (!m_CombatProps.isMess())
         {
             m_CombatProps.inMessDBuff();
         }
     }
 }
Пример #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject != master)
     {
         if (other.gameObject.tag == "nonLocalPlayer" &&
             master.gameObject.tag == "localPlayer")
         {
             SyncPosRot     syncScript = gameObject.GetComponent <SyncPosRot>();
             KBEngine.Arrow kbeArrow   = syncScript.entity as KBEngine.Arrow;
             CombatProps    cp         = other.gameObject.GetComponent <CombatProps>();
             if (cp != null)
             {
                 cp.addDamage((AttackType)kbeArrow.attackType, damage);
             }
         }
         Safe_Destroy();
     }
 }