예제 #1
0
 //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));
 }
예제 #2
0
 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));
         }
     }
 }
예제 #4
0
        private void Pickup(Fighter fighter)
        {
            fighter.EquipWeapon(weapon);

            if (!respawn)
            {
                Destroy(gameObject);
            }
            else
            {
                StartCoroutine(HideForSeconds(5f));
            }
        }
예제 #5
0
        private void PickUp(Fighter fighter)
        {
            if (weapon != null)
            {
                fighter.EquipWeapon(weapon);
            }

            if (healthToRestore > 0)
            {
                fighter.gameObject.GetComponent <Health>().Heal(healthToRestore);
            }

            StartCoroutine(HideForSeconds(respawnTime));
        }
예제 #6
0
        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));
        }
예제 #7
0
 private void Pickup(Fighter fighter)
 {
     fighter.EquipWeapon(weapon);
     StartCoroutine(HideForSeconds(respawnTime));
 }
예제 #8
0
 private void Pickup(Fighter fighter)
 {
     fighter.EquipWeapon(weapon);
     StartCoroutine(RespawnWeapon(respawnTimer));
 }
예제 #9
0
 private void Pickup(Fighter fighter)
 {
     fighter.EquipWeapon(weapon);
     // temp until inventory system is set up.
     StartCoroutine(HideForSeconds(respawnTime));
 }
예제 #10
0
 private void Pickup(Fighter fighter)
 {
     fighter.EquipWeapon(_weaponConfig);
     StartCoroutine(RespawnPickup(respawnTime));
 }
 private void Pickup(Fighter fighter)
 {
     fighter.EquipWeapon(weapon);
     StartCoroutine(HideObject(timeOfHiding));
 }