public void EquipPickup() { Vector3 deathPos = this.gameObject.transform.position; Quaternion deathRot = this.gameObject.transform.rotation; player = GameObject.FindWithTag("Player"); Destroy(player); // search again after original player destroyed player = GameObject.FindWithTag("Player"); ddol = player.GetComponent <DontDestroyOnLoad>(); ddol.PlayerCheck(); GameObject _playerEquipped = Instantiate(playerEquippedWithItemPrefab, deathPos, deathRot); _playerEquipped.tag = "Player"; animControllerScript = player.GetComponentInChildren <SimpleAnimationStateController>(); animControllerScript.RefreshAnimatorController(); }
public void EquipJingleBell() { playerEquippedWithStaff.SetActive(true); playerUnarmed.SetActive(false); animControllerScript.RefreshAnimatorController(); }