Exemplo n.º 1
0
        void IDebuggeable.Draw(MyDebug.Window window)
        {
            GUILayout.Label("Dungeon Scene State");
            GUILayout.Label($"State:{this.state.StateKey}");

            GUILayout.Label("Dungeon Scene Functions");

            if (GUILayout.Button("Remake"))
            {
                this.state.SetState(Phase.CreateStage);
            }
        }
        void IDebuggeable.Draw(MyDebug.Window window)
        {
            GUILayout.Label($"Floor:{this.floor}");

            this.stage.DrawDebugMenu(window);

            if (GUILayout.Button("Algorithm"))
            {
                DebugManager.Instance.OpenWindow(
                    "Algorithm",
                    this.algorithm.DrawDebugMenu
                    );
            }
        }
Exemplo n.º 3
0
 //-------------------------------------------------------------------------
 // Debug
 void IDebuggeable.Draw(MyDebug.Window window)
 {
     // データを列挙
     foreach (var entity in this.repository)
     {
         if (GUILayout.Button($"{entity.Value.Name}"))
         {
             DebugManager.Instance.OpenWindow(nameof(EnemyMaster), (win) =>
             {
                 this.DrawDebugDetail(entity.Value);
             });
         }
     }
 }
Exemplo n.º 4
0
        //-------------------------------------------------------------------------
        // デバッグ

        void IDebuggeable.Draw(MyDebug.Window window)
        {
            this.enemies.ForEach((e) =>
            {
                if (GUILayout.Button($"{e.Coord} 詳細"))
                {
                    DebugManager.Instance.OpenWindow("EnemyDetail",
                                                     (newWindow) =>
                    {
                        e.DrawDebugMenu();
                    });
                }
            });
        }
Exemplo n.º 5
0
 //-------------------------------------------------------------------------
 // デバッグ
 void IDebuggeable.Draw(MyDebug.Window window)
 {
     GUILayout.Label($"State:{this.state.StateKey}");
 }
Exemplo n.º 6
0
        public void DrawDebugMenu(MyDebug.Window window)
        {
            GUIStyle sWall          = new GUIStyle();
            GUIStyle sRoom          = new GUIStyle();
            GUIStyle sAisle         = new GUIStyle();
            GUIStyle sReservedAisle = new GUIStyle();
            GUIStyle sConfluence    = new GUIStyle();
            GUIStyle sCross         = new GUIStyle();

            sWall.normal.textColor          = Color.black;
            sRoom.normal.textColor          = Color.blue;
            sAisle.normal.textColor         = Color.white;
            sReservedAisle.normal.textColor = Color.gray;
            sConfluence.normal.textColor    = Color.magenta;
            sCross.normal.textColor         = Color.cyan;

            using (var h = new GUILayout.HorizontalScope())
            {
                MapForChip((int x, int y, BitFlag chip) =>
                {
                    GUIStyle style = null;

                    if (chip.Contain((uint)Flags.Wall))
                    {
                        style = sWall;
                    }
                    if (chip.Contain((uint)Flags.Room))
                    {
                        style = sRoom;
                    }
                    if (chip.Contain((uint)Flags.ReservedAisle))
                    {
                        style = sReservedAisle;
                    }
                    if (chip.Contain((uint)Flags.Aisle))
                    {
                        style = sAisle;
                    }
                    if (chip.Contain((uint)Flags.Confluence))
                    {
                        style = sConfluence;
                    }
                    if (chip.Contain((uint)Flags.Cross))
                    {
                        style = sCross;
                    }

                    if (style != null)
                    {
                        bool isNewColumn = (y % Define.HEIGHT == 0);
                        bool isEndColumn = (y != 0 && y % (Define.HEIGHT - 1) == 0);

                        if (isNewColumn)
                        {
                            GUILayout.BeginVertical();
                        }

                        const float s = 7;
                        GUILayout.Label("■", style, GUILayout.Width(s), GUILayout.Height(s));

                        if (isEndColumn)
                        {
                            GUILayout.EndVertical();
                        }
                    }
                });
            }
        }
Exemplo n.º 7
0
 //-------------------------------------------------------------------------
 // デバッグ
 void IDebuggeable.Draw(MyDebug.Window window)
 {
     this.player.DrawDebug();
 }
Exemplo n.º 8
0
        public void DrawDebugMenu(MyDebug.Window window)
        {
            this._mode = GUILayout.SelectionGrid(this._mode, this._modes, this._modes.Length);

            GUIStyle sWall   = new GUIStyle();
            GUIStyle sAisle  = new GUIStyle();
            GUIStyle sRoom   = new GUIStyle();
            GUIStyle sPlayer = new GUIStyle();
            GUIStyle sGoal   = new GUIStyle();
            GUIStyle sItem   = new GUIStyle();
            GUIStyle sEnemy  = new GUIStyle();

            GUIStyle style = null;

            sWall.normal.textColor   = Color.black;
            sAisle.normal.textColor  = Color.gray;
            sRoom.normal.textColor   = Color.blue;
            sPlayer.normal.textColor = Color.white;
            sGoal.normal.textColor   = Color.yellow;
            sItem.normal.textColor   = Color.cyan;
            sEnemy.normal.textColor  = Color.red;

            this.Map((int x, int y, Tile tile) =>
            {
                if (tile.IsWall)
                {
                    style = sWall;
                }
                if (tile.IsAisle)
                {
                    style = sAisle;
                }
                if (tile.IsRoom)
                {
                    style = sRoom;
                }
                if (tile.IsPlayer)
                {
                    style = sPlayer;
                }
                if (tile.IsGoal)
                {
                    style = sGoal;
                }
                if (tile.IsItem)
                {
                    style = sItem;
                }
                if (tile.IsEnemy)
                {
                    style = sEnemy;
                }

                // 通常モードの場合、踏破してない場所は壁で代用
                if (this._mode == 1 && !tile.IsClear)
                {
                    style = sWall;
                }

                // 踏破モードの場合は踏破している箇所のみ色を付ける
                if (this._mode == 2)
                {
                    style = (tile.IsClear)? sGoal : sWall;
                }

                if (style != null)
                {
                    bool isNewLine = (x % Define.WIDTH == 0);
                    bool isEndLine = (x != 0 && x % (Define.WIDTH - 1) == 0);

                    if (isNewLine)
                    {
                        GUILayout.BeginHorizontal();
                    }

                    const int s = 7;
                    GUILayout.Label("■", style, GUILayout.Width(s), GUILayout.Height(s));

                    if (isEndLine)
                    {
                        GUILayout.EndHorizontal();
                    }
                }
            });
        }