/// <summary> /// This Coroutine determines the action of the NPC when clicked /// </summary> /// <returns>Returns null</returns> public override IEnumerator CoroutineExecute() { input.ChangeTypeOfControl(TypeOfControl.InNPCInteraction); // Smoothly rotates npc towards the player and player towards npc movementBehaviour.ExecuteBehaviour(); // Gets next npc's action StartCoroutine(GetNextAction()); yield break; }
/// <summary> /// Update method for tutorial /// </summary> private void Update() { if (input.Space) { ChangeTutorial(); } if (tutorialParent.activeSelf) { input.ChangeTypeOfControl(TypeOfControl.InTutorial); } }
/// <summary> /// This method determines the action of the door when clicked /// </summary> public override void Execute() { // If the code hasn't been inserted yet if (UserCode != doorCode && playerInfo.PuzzlesDone.HasFlag(myPuzzle) == false) { //Instantiates a new padlock that the user can interact with//////// input.ChangeTypeOfControl(TypeOfControl.InDoorWithCode); padlockCanvas.SetActive(true); UserCode = new CustomVector3(0, 0, 0); newPadlock = Instantiate(padlock); newPadlock.transform.position = padlockPosition.position; newPadlock.transform.rotation = padlockPosition.rotation; //////////////////////////////////////////////////////////////////// } }
/// <summary> /// Start method for PlayerGeneralInfo /// </summary> private void Start() { input.ChangeTypeOfControl(startingControl); CurrentTypeOfRoom = startingRoom; PuzzlesDone = PuzzlesEnum.Default; }
/// <summary> /// Awake method for OnCutsceneAwake /// </summary> private void Awake() { input = FindObjectOfType <PlayerInput>(); input.ChangeTypeOfControl(TypeOfControl.InCutscene); }