예제 #1
0
    /// <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;
    }
예제 #2
0
    /// <summary>
    /// Update method for tutorial
    /// </summary>
    private void Update()
    {
        if (input.Space)
        {
            ChangeTutorial();
        }

        if (tutorialParent.activeSelf)
        {
            input.ChangeTypeOfControl(TypeOfControl.InTutorial);
        }
    }
예제 #3
0
    /// <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;
            ////////////////////////////////////////////////////////////////////
        }
    }
예제 #4
0
 /// <summary>
 /// Start method for PlayerGeneralInfo
 /// </summary>
 private void Start()
 {
     input.ChangeTypeOfControl(startingControl);
     CurrentTypeOfRoom = startingRoom;
     PuzzlesDone       = PuzzlesEnum.Default;
 }
예제 #5
0
    /// <summary>
    /// Awake method for OnCutsceneAwake
    /// </summary>
    private void Awake()
    {
        input = FindObjectOfType <PlayerInput>();

        input.ChangeTypeOfControl(TypeOfControl.InCutscene);
    }