Ejemplo n.º 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++;
                    }
                }
            }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 4
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;
                }
            }
Ejemplo n.º 5
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++;
                }
            }
Ejemplo n.º 6
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;
                }
            }