Exemple #1
0
 private void OnTriggerEnter(Collider itemCol)
 {
     if (itemCol.CompareTag("Armor"))
     {
         ArmorPref     = itemCol.GetComponent <ArmorPref>();
         itemTypeCheck = 1;
         checkObject   = true;
         ArmorOut      = itemCol.gameObject;
     }
 }
Exemple #2
0
 private void DropItem() // сброс объекта и создание внешнего объекта
 {
     ParentContainer    = ArmorTag.Armor.GetComponent <ParentContainer>();
     ArmorPref          = ParentContainer.Parent_Tr.GetComponent <ArmorPref>();
     ArmorPref.priority = ArmorTag.priorityArmor;
     Instantiate(ParentContainer.Parent_Tr, transform.position, transform.rotation);
     Destroing(ArmorTag.Armor);
     ArmorTag.priorityArmor = 0;
     ArmorTag.weightArmor   = 0;
     ArmorTag.maxCondition  = 0;
     ArmorTag.maxHealth     = 0;
     ArmorTag.itemName      = "";
     ArmorTag.priorityName  = "";
     ArmorTag.Armor         = null;
     ArmorPref       = null;
     ParentContainer = null;
     isWearArmor     = false;
 }
Exemple #3
0
 private void OnTriggerExit(Collider itemCol)
 {
     ArmorPref   = null;
     checkObject = false;
 }