Ejemplo n.º 1
0
        private void Update()
        {
            // Pause input for other external input.
            if (inputPaused)
            {
                if (Time.time > inputPauseTimeout)
                {
                    inputPaused = false;
                }
                else
                {
                    return;
                }
            }

            Inputs();
            Blocking();
            Moving();
            Damage();
            SwitchWeapons();

            if (!rpgCharacterController.IsActive("Relax"))
            {
                Strafing();
                Facing();
                Aiming();
                Rolling();
                Attacking();
            }
        }
        private void Update()
        {
            Inputs();
            Blocking();
            Moving();
            Damage();
            SwitchWeapons();

            if (!rpgCharacterController.IsActive("Relax"))
            {
                Strafing();
                Facing();
                Aiming();
                Rolling();
                Attacking();
            }
        }
Ejemplo n.º 3
0
        private void Blocking()
        {
            if (!rpgCharacterController.isCasting && !rpgCharacterController.isSitting && !rpgCharacterController.IsActive("Relax"))
            {
                bool blockGui = GUI.Toggle(new Rect(25, 215, 100, 30), rpgCharacterController.isBlocking, "Block");

                if (blockGui && rpgCharacterController.CanStartAction("Block"))
                {
                    rpgCharacterController.StartAction("Block");
                }
                else if (!blockGui && rpgCharacterController.CanEndAction("Block"))
                {
                    rpgCharacterController.EndAction("Block");
                }

                if (blockGui)
                {
                    if (GUI.Button(new Rect(30, 240, 100, 30), "Get Hit"))
                    {
                        rpgCharacterController.StartAction("GetHit", new HitContext());
                    }
                }
            }
        }