Exemplo n.º 1
0
 public void Action(string text, bool popup = true)
 {
     _ui_objectiveText.UpdateText(text);
     if (popup)
     {
         _ui_objectiveText.PopUp();
     }
 }
Exemplo n.º 2
0
 public void UpdateObjectiveText(string text = "", bool popup = true)
 {
     _ui_objectiveText.UpdateText(text);
     if (popup)
     {
         _ui_objectiveText.PopUp();
     }
 }
Exemplo n.º 3
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject == _playerRef)
     {
         _ui_objectiveText.UpdateText(_newText);
         if (_popUp)
         {
             _ui_objectiveText.PopUp();
         }
         if (_destroyGameObjectAfterTouch)
         {
             Destroy(gameObject);
         }
     }
 }
Exemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        //Interact
        if (m_interactControl.GetAxisOnce())
        {
            _interact.Activate(_interactDistance);
        }

        if (_buttonHold && m_interactControl.GetAxisBool())
        {
            _hold.HoldItem(_interactDistance, _holdDistance, _holdRadiusCheck, _physicsBasedHolding);
        }
        if (!_buttonHold && m_interactControl.GetAxisOnce())
        {
            _hold.ClickHoldItem(_interactDistance, _holdDistance, _physicsBasedHolding);
        }

        if (m_modifierLeftButton.GetAxisBool() && _hold.heldObject != null)
        {
            //Rotate Object
        }

        //Jump
        float jumpInput;
        float verticalJumpInput;

        //if ( _useInvertedControlsUpsideDown )
        //{
        if (Camera.main.GetComponent <CameraControl>().rotationY >= SettingsComponent.gl_InvertAngle || Camera.main.GetComponent <CameraControl>().rotationY <= -SettingsComponent.gl_InvertAngle)
        {
            jumpInput         = -m_jumpControl.GetAxis();
            verticalJumpInput = -m_playerVerticalInput.GetAxis();
        }
        else
        {
            jumpInput         = m_jumpControl.GetAxis();
            verticalJumpInput = m_playerVerticalInput.GetAxis();
        }
        //}
        //else
        //{
        //    jumpInput = m_jumpControl.GetAxis();
        //    verticalJumpInput = m_playerVerticalInput.GetAxis();
        //}

        float jumpBoost = _jump.HoldBoostF(jumpInput, gameObject, _jumpRadius, _jumpBoostMax);

        if (jumpBoost != 0 && jumpInput == 0)
        {
            _jump.BoostJump(gameObject, m_playerHorizontalInput.GetAxis(), verticalJumpInput);
        }

        //Wall Movement
        _wallMovement.WallMove(verticalJumpInput, m_playerHorizontalInput.GetAxis(), gameObject, _jumpRadius, _wallGlideSpeed);

        //ObjectiveHint
        if (m_objectiveHintControl.GetAxisBool())
        {
            _ui_objectiveText.PopUp();
            _ui_objectiveIcon.PopUp();
        }
    }
Exemplo n.º 5
0
 public void PopUpText()
 {
     _ui_objectiveText.PopUp();
 }