Beispiel #1
0
        /// <summary>
        /// デバッグ
        /// </summary>
        public void OnDebug()
        {
            using (new GUILayout.VerticalScope(GUI.skin.box))
            {
                // HP
                GUILayout.Label($"最大HP:{MaxHp}");

                // MP
                GUILayout.Label("MP:Use / Max");
                MyEnum.ForEach <App.Attribute>((attribute) => {
                    GUILayout.Label($"{attribute}:{GetUseMp(attribute)}/{GetUseMp(attribute)}");
                });
            }
        }
Beispiel #2
0
        private void OnDebugJoyConfig()
        {
            var menus = MyEnum.GetNames <App.JoyType>();

            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Label("JoyConfig");
                __SelectedJoyConfigIndex
                    = GUILayout.SelectionGrid(__SelectedJoyConfigIndex, menus, menus.Length);
            }

            App.JoyType type = MyEnum.Parse <App.JoyType>(menus[__SelectedJoyConfigIndex]);
            this.joyConfigs[type].OnDebug();
        }
Beispiel #3
0
        private void OnDebugKeyConfig()
        {
            var menus = MyEnum.GetNames <App.OperationMethod>();

            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Label("KeyConfig");
                __SelectedKeyConfigIndex
                    = GUILayout.SelectionGrid(__SelectedKeyConfigIndex, menus, menus.Length);
            }

            App.OperationMethod type
                = MyEnum.Parse <App.OperationMethod>(menus[__SelectedKeyConfigIndex]);

            this.keyConfigs[type].OnDebug();
        }
        //-------------------------------------------------------------------------
        // デバッグ
        public override void OnDebug()
        {
            using (new GUILayout.VerticalScope()) {
                // Traceを有効にする
                __enableTrace = GUILayout.Toggle(__enableTrace, "Trace");

                if (!__enableTrace)
                {
                    OnDebugProps(__props);
                }
                else
                {
                    using (new GUILayout.HorizontalScope()) {
                        __traceTime = GUILayout.HorizontalSlider(__traceTime, 0.01f, 1f);
                    }
                    OnDebugProps(__trace);
                }

                MyEnum.ForEach <Type>((type) => {
                    if (GUILayout.Button($"{type}"))
                    {
                        var p          = Create(type);
                        __props.Sprite = __Sprite;
                        p.Setup(__props);

                        if (__enableTrace)
                        {
                            __trace.Sprite = __Sprite;
                            p.SetTrace(__trace, __traceTime);
                        }

                        p.Fire(Vector3.zero);
                    }
                });
            }
        }