//yerden alma fonksiyonu private void Pickup(Fighter fighter) { //yerden alınan silah kuşanıldı fighter.EquipWeapon(weapon); //yerden alınan silah bir müddet gözden kayboldu StartCoroutine(HideForSeconds(respawnTime)); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { Fighter fighter = other.gameObject.GetComponent <Fighter>(); fighter.EquipWeapon(weapon); StartCoroutine(HideForSeconds()); } }
void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "Player") { Fighter fighter = collider.gameObject.GetComponent <Fighter>(); if (fighter != null) { fighter.EquipWeapon(weapon); StartCoroutine(HideForSeconds(respawnTime)); } } }
private void Pickup(Fighter fighter) { fighter.EquipWeapon(weapon); if (!respawn) { Destroy(gameObject); } else { StartCoroutine(HideForSeconds(5f)); } }
private void PickUp(Fighter fighter) { if (weapon != null) { fighter.EquipWeapon(weapon); } if (healthToRestore > 0) { fighter.gameObject.GetComponent <Health>().Heal(healthToRestore); } StartCoroutine(HideForSeconds(respawnTime)); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag != "Player") { return; } Fighter fighter = other.GetComponent <Fighter>(); if (fighter.GetIsArmed()) { fighter.DestroyWeapon(); } if (isSpell) { fighter.EquipSpell(spell); } else { fighter.EquipWeapon(weapon); } StartCoroutine(HideCollectable(respawnTime)); }
private void Pickup(Fighter fighter) { fighter.EquipWeapon(weapon); StartCoroutine(HideForSeconds(respawnTime)); }
private void Pickup(Fighter fighter) { fighter.EquipWeapon(weapon); StartCoroutine(RespawnWeapon(respawnTimer)); }
private void Pickup(Fighter fighter) { fighter.EquipWeapon(weapon); // temp until inventory system is set up. StartCoroutine(HideForSeconds(respawnTime)); }
private void Pickup(Fighter fighter) { fighter.EquipWeapon(_weaponConfig); StartCoroutine(RespawnPickup(respawnTime)); }
private void Pickup(Fighter fighter) { fighter.EquipWeapon(weapon); StartCoroutine(HideObject(timeOfHiding)); }