示例#1
0
            public void Draw(IPuzzleUI ui)
            {
                ui.SetColor(TileColor);
                ui.DrawCircle(X, Y, 50);
                ui.SetColor(Color.Black);

                int c = 0;

                foreach (var a in Adj)
                {
                    if (Line[a] == true)
                    {
                        int b = Rotation + c;
                        ui.DrawLine(X, Y, X + (int)(Math.Sin((b) * Math.PI / 3) * 50), Y + (int)(Math.Cos((b) * Math.PI / 3) * 50));
                    }

                    if (ID != 0)
                    {
                        if (a == 0)
                        {
                            c++;
                        }
                        else
                        {
                            c = -1;
                        }
                    }
                    else
                    {
                        c++;
                    }
                }
            }
示例#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 DrawUI(IPuzzleUI ui)
        {
            ui.BeginUI();

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

            ui.EndUI();
        }
示例#4
0
        public void DrawUI(IPuzzleUI ui)
        {
            ui.BeginUI();

            ui.DrawText(300, 600, victories.ToString());

            foreach (var Tile in TileList)
            {
                Tile.Draw(ui);
            }

            ui.EndUI();
        }
示例#5
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;
                }
            }
示例#6
0
        public void DrawUI(IPuzzleUI ui)
        {
            ui.BeginUI();

            //ui.DrawText(300, 600, victories.ToString());

            foreach (var tile in this.TileList)
                tile.Draw(ui);

            ui.EndUI();
        }
示例#7
0
            public void Draw(IPuzzleUI ui)
            {
                ui.SetColor(this.TileColor);
                ui.DrawCircle(this.X, this.Y, 50);
                ui.SetColor(Color.Black);

                var c = 0;

                foreach (var a in this.Adj)
                {
                    if (this.Line[a])
                    {
                        var b = this.Rotation + c;
                        ui.DrawLine(this.X, this.Y, this.X + (int) (Math.Sin((b) * Math.PI / 3) * 50),
                            this.Y + (int) (Math.Cos((b) * Math.PI / 3) * 50));
                    }

                    if (this.ID != 0)
                    {
                        if (a == 0)
                            c++;
                        else
                            c = -1;
                    }
                    else
                        c++;
                }
            }
示例#8
0
        public void DrawUI(IPuzzleUI ui)
        {
            ui.BeginUI();

            ui.DrawText(300, 600, "0");

            foreach (var tile in this.TileList)
                tile.Draw(ui);

            ui.EndUI();
        }
示例#9
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;
                }
            }