public void StartMeditation() { startMedButton.SetActive(false); playerMover.ForceMove(playerStandPosition.position, playerStandPosition.rotation, "StartSunMeditation"); if (OnMeditationStarted != null) { OnMeditationStarted(); } }
//Called by UI button public void PlayerTakeItem() { if (inventory == null) { return; } Quaternion playerToKeyRotation = Quaternion.LookRotation(this.transform.position - mover.transform.position); mover.ForceMove(Vector3.zero, playerToKeyRotation, "PickUp"); StartCoroutine(ItemPickedUpCoroutine()); }
public void StartOpeningSequence() { Item key = playerInventory.GetKey(openKeyID); if (key == null) { return; } playerInventory.RemoveItem(key); transform.GetComponent <BoxCollider>().enabled = false; openButton.SetActive(false); if (playerMover != null) { playerMover.ForceMove(standingPoint.position, standingPoint.rotation, "Activate"); } StartCoroutine(StartOpeningCor()); }