Beispiel #1
0
        // Death / Debug.
        private void Misc()
        {
            string deathReviveLabel = rpgCharacterController.isDead ? "Revive" : "Death";

            if (!rpgCharacterController.isClimbing && !rpgCharacterController.isCasting && !rpgCharacterController.isSitting && rpgCharacterController.maintainingGround)
            {
                if (GUI.Button(new Rect(30, 270, 100, 30), deathReviveLabel))
                {
                    if (rpgCharacterController.CanStartAction("Death"))
                    {
                        rpgCharacterController.StartAction("Death");
                    }
                    else if (rpgCharacterController.CanEndAction("Death"))
                    {
                        rpgCharacterController.EndAction("Death");
                    }
                }
            }
            // Debug.
            if (GUI.Button(new Rect(600, 20, 120, 30), "Debug Controller"))
            {
                rpgCharacterController.ControllerDebug();
            }
            if (GUI.Button(new Rect(600, 50, 120, 30), "Debug Animator"))
            {
                rpgCharacterController.AnimatorDebug();
            }
        }