예제 #1
0
        public void DrawUI(IPuzzleUI ui)
        {
            ui.BeginUI();

            ui.SetColor(m_Color);
            ui.DrawRectangle(0, 0, 110, 200);
            ui.DrawText(20, 20, "hello");

            ui.EndUI();
        }
예제 #2
0
        public void DrawUI(IPuzzleUI ui)
        {
            ui.BeginUI();

            ui.SetColor(this.m_Color);
            ui.DrawRectangle(0, 0, 110, 200);
            ui.DrawText(20, 20, "hello");

            ui.EndUI();
        }
예제 #3
0
            public void Draw(IPuzzleUI ui)
            {
                ui.SetColor(this.TileColor);

                ui.DrawRectangle(this.X - this.Size / 2, this.Y - this.Size / 2, this.X + this.Size / 2,
                    this.Y + this.Size / 2);

                ui.SetColor(Color.Blue);
                switch (this.Rotation)
                {
                    case 0:
                        if (this.Line[0])
                            ui.DrawLine(this.X, this.Y, this.X, this.Y + this.Size / 2);
                        if (this.Line[1])
                            ui.DrawLine(this.X, this.Y, this.X + this.Size / 2, this.Y);
                        if (this.Line[2])
                            ui.DrawLine(this.X, this.Y, this.X, this.Y - this.Size / 2);
                        if (this.Line[3])
                            ui.DrawLine(this.X, this.Y, this.X - this.Size / 2, this.Y);
                        break;
                    case 1:
                        if (this.Line[1])
                            ui.DrawLine(this.X, this.Y, this.X, this.Y + this.Size / 2);
                        if (this.Line[2])
                            ui.DrawLine(this.X, this.Y, this.X + this.Size / 2, this.Y);
                        if (this.Line[3])
                            ui.DrawLine(this.X, this.Y, this.X, this.Y - this.Size / 2);
                        if (this.Line[0])
                            ui.DrawLine(this.X, this.Y, this.X - this.Size / 2, this.Y);
                        break;
                    case 2:
                        if (this.Line[2])
                            ui.DrawLine(this.X, this.Y, this.X, this.Y + this.Size / 2);
                        if (this.Line[3])
                            ui.DrawLine(this.X, this.Y, this.X + this.Size / 2, this.Y);
                        if (this.Line[0])
                            ui.DrawLine(this.X, this.Y, this.X, this.Y - this.Size / 2);
                        if (this.Line[1])
                            ui.DrawLine(this.X, this.Y, this.X - this.Size / 2, this.Y);
                        break;
                    case 3:
                        if (this.Line[3])
                            ui.DrawLine(this.X, this.Y, this.X, this.Y + this.Size / 2);
                        if (this.Line[0])
                            ui.DrawLine(this.X, this.Y, this.X + this.Size / 2, this.Y);
                        if (this.Line[1])
                            ui.DrawLine(this.X, this.Y, this.X, this.Y - this.Size / 2);
                        if (this.Line[2])
                            ui.DrawLine(this.X, this.Y, this.X - this.Size / 2, this.Y);
                        break;
                }
            }
예제 #4
0
            public void Draw(IPuzzleUI ui)
            {
                ui.SetColor(TileColor);

                ui.DrawRectangle(X - Size / 2, Y - Size / 2, X + Size / 2, Y + Size / 2);

                ui.SetColor(Color.Blue);
                switch (Rotation)
                {
                case 0:
                    if (Line[0] == true)
                    {
                        ui.DrawLine(X, Y, X, Y + Size / 2);
                    }
                    if (Line[1] == true)
                    {
                        ui.DrawLine(X, Y, X + Size / 2, Y);
                    }
                    if (Line[2] == true)
                    {
                        ui.DrawLine(X, Y, X, Y - Size / 2);
                    }
                    if (Line[3] == true)
                    {
                        ui.DrawLine(X, Y, X - Size / 2, Y);
                    }
                    break;

                case 1:
                    if (Line[1] == true)
                    {
                        ui.DrawLine(X, Y, X, Y + Size / 2);
                    }
                    if (Line[2] == true)
                    {
                        ui.DrawLine(X, Y, X + Size / 2, Y);
                    }
                    if (Line[3] == true)
                    {
                        ui.DrawLine(X, Y, X, Y - Size / 2);
                    }
                    if (Line[0] == true)
                    {
                        ui.DrawLine(X, Y, X - Size / 2, Y);
                    }
                    break;

                case 2:
                    if (Line[2] == true)
                    {
                        ui.DrawLine(X, Y, X, Y + Size / 2);
                    }
                    if (Line[3] == true)
                    {
                        ui.DrawLine(X, Y, X + Size / 2, Y);
                    }
                    if (Line[0] == true)
                    {
                        ui.DrawLine(X, Y, X, Y - Size / 2);
                    }
                    if (Line[1] == true)
                    {
                        ui.DrawLine(X, Y, X - Size / 2, Y);
                    }
                    break;

                case 3:
                    if (Line[3] == true)
                    {
                        ui.DrawLine(X, Y, X, Y + Size / 2);
                    }
                    if (Line[0] == true)
                    {
                        ui.DrawLine(X, Y, X + Size / 2, Y);
                    }
                    if (Line[1] == true)
                    {
                        ui.DrawLine(X, Y, X, Y - Size / 2);
                    }
                    if (Line[2] == true)
                    {
                        ui.DrawLine(X, Y, X - Size / 2, Y);
                    }
                    break;
                }
            }