Checking equipment type to chop trees
Hello guys,
This is my first post here, I always try to search the answer before asking but this time i couldn't find it at all. So I have an equipment script where i've made an enum for the equipment slot and equipment type:
public EquipmentSlot equipSlot; public EquipmentType equipmentType; public SkinnedMeshRenderer mesh; public EquipmentMeshRegion[] coveredMeshRegions; public int armorModifier; public int damageModifier; public override void Use() { base.Use(); RemoveFromInventory(); EquipmentManager.instance.Equip(this); } } public enum EquipmentType { Sword, Axe } public enum EquipmentSlot { Head, Chest, Legs, Weapon, Offhand, Feet, Hands } public enum EquipmentMeshRegion {Legs, Arms, Torso } // Corresponds to body blendsshapes
In my EquipmentManager script I coded so that items come in their respective slots for example weapons come in weapon slot etc. How can I now check in another script for example: 'LifeSkils' if I have a weapon with axe as Equipment Type equiped before being able to chop wood?
Your answer
Follow this Question
Related Questions
Get and Set only work on public variable? 1 Answer
In Game Programming Language 1 Answer
Instantiate no longer working? 3 Answers
Delete item in inventory 0 Answers
WaitForSeconds Does not work,WaitForSeconds Problem 0 Answers