void RefillAmmo(Collider2D _col) { if (ammo > 0 && _col.gameObject.GetComponent <NPCWeapon>()) { NPCWeapon npcweapon = _col.gameObject.GetComponent <NPCWeapon>(); npcweapon.ammo += npcweapon.cartridge; ammo--; } }
public NPCDataSheet(NPCStats stats, NPCWeapon primaryWeapon, NPCWeapon secondWeapon) { NPCStats = stats; PriamaryWeapon = primaryWeapon; SecondaryWeapon = secondWeapon; }
void Start() { ammoTextMesh = GetComponent <TextMesh>(); npcweapon = GetComponentInParent <NPCWeapon>(); }