//Whenever the gramophone is clicked it initializes the unlock vinyls puzzle if it wasn't solved else it initializes the gramophone notes puzzle
 public override void Interact()
 {
     if (!GameplayChecker.GramophonePuzzle)
     {
         interactableManager = GameObject.Find("Interaction").GetComponent <InteractableManager>();
         interactableManager.currentWindow = gameObject;
         if (GameplayChecker.GramophoneVinylsUnlockPuzzle)
         {
             interactableManager.Activate("Gramophone");
         }
         else
         {
             interactableManager.Activate("Vinyl");
         }
     }
 }
예제 #2
0
        public override void Interact()
        {
            Debug.Log("Interacted");
            Debug.Log(PlayerPrefs.GetString("CurrentTime"));

            if (PlayerPrefs.GetString("CurrentTime").StartsWith("Past") && !isPlaying)
            {
                isActive = GameObject.Find("Lever_Right").GetComponent <LeverRight>().activated;

                if (isActive)
                {
                    Play();
                }
            }
            else
            {
                if (!GameplayChecker.PianoPuzzleSolved)
                {
                    InteractableManager = GameObject.Find("Interaction").GetComponent <InteractableManager>();
                    InteractableManager.pianoInteraction = this.gameObject;
                    if (GameObject.Find("Piano"))
                    {
                        InteractableManager.Activate("Piano");
                    }
                }
            }
        }
 private void InstantiateAndActivate()
 {
     InteractableManager = GameObject.Find("Interaction").GetComponent <InteractableManager>();
     InteractableManager.picturesInteraction = this.gameObject;
     if (InteractableManager == null)
     {
         return;
     }
     playerAgent = GameObject.Find("Character(Clone)").GetComponent <NavMeshAgent>();
     InteractableManager.Activate("Pictures");
 }
예제 #4
0
 public override void Interact()
 {
     if (!GameplayChecker.GramophonePuzzle)
     {
         interactableManager = GameObject.Find("Interaction").GetComponent <InteractableManager>();
         interactableManager.gramophoneInteraction = this.gameObject;
         if (GameObject.Find("Gramophone"))
         {
             interactableManager.Activate("Gramophone");
         }
     }
 }
예제 #5
0
 public override void Interact()
 {
     if (!GameplayChecker.CraftedInvisiblityFlask)
     {
         interactableManager = GameObject.Find("Interaction").GetComponent <InteractableManager>();
         interactableManager.craftInteraction = this.gameObject;
         if (GameObject.Find("AlchemyTable"))
         {
             interactableManager.Activate("AlchemyTable");
         }
     }
 }
 //Activates the puzzle interaction window
 private void InstantiateAndActivate()
 {
     InteractableManager = GameObject.Find("Interaction").GetComponent <InteractableManager>();
     InteractableManager.Activate("Pictures");
 }
예제 #7
0
        public override void Interact()
        {
            if (!IsSafeOpen && !GameplayChecker.SafePuzzleSolved)
            {
                InteractableManager = GameObject.Find("Interaction").GetComponent <InteractableManager>();
                InteractableManager.safeInteraction = this.gameObject;
                if (InteractableManager == null)
                {
                    return;
                }
                playerAgent = GameObject.Find("Character(Clone)").GetComponent <NavMeshAgent>();

                if (GameObject.Find("Safe"))
                {
                    InteractableManager.Activate("Safe");
                }
                SafePinNumber    = GameObject.Find("Code").GetComponent <SafePinNumber>();
                SafeDoors        = GameObject.Find("Safe").transform.GetChild(0).GetComponent <Transform>();
                SafePinNumberObj = GameObject.Find("Code");


                if (SafePinNumber == null)
                {
                    return;
                }
                if (SafeDoors == null)
                {
                    return;
                }
                if (SafePinNumberObj == null)
                {
                    return;
                }


                if (PinNumbersObjects.Count > 1)
                {
                    PinNumbersObjects = new List <Transform>();
                }
                if (PinNumbersObjects != null)
                {
                    for (int i = 0; i < 4; i++)
                    {
                        PinNumbersObjects.Add(SafePinNumberObj.transform.GetChild(i));
                    }
                }
            }
            else
            {
                if (IsSafeOpen)
                {
                    SafeDoors.Rotate(new Vector3(0f, 0f, 99.192f));
                    IsSafeOpen = false;
                }

                else
                {
                    SafeDoors.Rotate(new Vector3(0f, 0f, -99.192f));
                    IsSafeOpen = true;
                }
            }
        }