Esempio n. 1
0
    private void HandleStandardInput(InputDevice device)
    {
        if (device == null)
        {
            return;
        }
        Vector3 inputVector = new Vector3(device.LeftStickX.Value, 0f, device.LeftStickY.Value);

        _characterMotor.AddInputWithPriority(inputVector, ControlPriority.Hunter);
        InputControl smellButton = device.Action1;
        InputControl catchButton = device.Action4;

        if (smellButton.WasPressed)
        {
            SmellManager.g.StartSmellInRoomWithHunter(_currRoomFinder.Room, this);
        }
        if (_canAbortSmellPrematurely && smellButton.WasReleased)
        {
            SmellManager.g.StopSmelling();
        }
        if (catchButton.WasPressed)
        {
            TryToCatch();
        }
    }
Esempio n. 2
0
    void FixedUpdate()
    {
        if (_paused)
        {
            return;
        }
        UpdateBehaviors();
        Vector3 inputVector = ChooseDirectionGivenContextMapAndHeading(_contextMap, _transform.forward);

        if (_idle)
        {
            inputVector = Vector3.zero;
        }
        _characterMotor.AddInputWithPriority(inputVector, ControlPriority.NPC);
    }
Esempio n. 3
0
    private void HandleInput(InputDevice device)
    {
        if (device == null)
        {
            return;
        }
        Vector3 inputVector = new Vector3(device.LeftStickX.Value, 0f, device.LeftStickY.Value);

        _characterMotor.AddInputWithPriority(inputVector, ControlPriority.Ghost);

        InputControl possessionButton = device.Action1;
        InputControl hauntButton      = device.Action3;

        if (possessionButton.WasPressed)
        {
            JumpToClosest();
        }
        if (hauntButton.WasPressed)
        {
            HauntManager.g.StartHauntInRoom(_currRoomFinder.Room);
        }
    }