public override IEnumerator OnPressActionDelay(GameObject cc) { yield return(StartCoroutine(base.OnPressActionDelay(cc))); manager = cc.GetComponent <vCollectMeleeControl>(); if (manager != null) { manager.HandleCollectableInput(this); } }
IEnumerator DelayedEquip(float delay) { yield return(new WaitForSeconds(delay)); if (rootBone.childCount > 0) { GameObject weapon = rootBone.GetChild(0).gameObject; if (weapon != null && weapon.tag == "Weapon") { vCollectableStandalone collectable = weapon.GetComponentInChildren <vCollectableStandalone>(); equippedWeaponType = weapon.GetComponent <WeaponType>().GetWeaponType(); meleeControl.HandleCollectableInput(collectable); } else { // Unarmed Deals Damage equippedWeaponType = FarmWeaponType.Damage; } } }