Esempio n. 1
0
 public void StartMeditation()
 {
     startMedButton.SetActive(false);
     playerMover.ForceMove(playerStandPosition.position, playerStandPosition.rotation, "StartSunMeditation");
     if (OnMeditationStarted != null)
     {
         OnMeditationStarted();
     }
 }
Esempio n. 2
0
        //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());
        }
Esempio n. 3
0
        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());
        }