Ejemplo n.º 1
0
        public virtual void Draw()
        {
            //draws sprite and direction they are pointing
            Raylib.DrawLine(
                (int)(WorldPosition.X * 32),
                (int)(WorldPosition.Y * 32),
                (int)((WorldPosition.X + Forward.X) * 32),
                (int)((WorldPosition.Y + Forward.Y) * 32),
                Color.WHITE
                );

            Raylib.DrawCircleLines((int)(WorldPosition.X * 32), (int)(WorldPosition.Y * 32), _collisionRadius * 32, Color.GREEN);

            //Changes the color of the console text to be this actors color
            Console.ForegroundColor = _color;

            //Only draws the actor on the console if it is within the bounds of the window
            if (WorldPosition.X >= 0 && WorldPosition.X < Console.WindowWidth &&
                WorldPosition.Y >= 0 && WorldPosition.Y < Console.WindowHeight)
            {
                Console.SetCursorPosition((int)WorldPosition.X, (int)WorldPosition.Y);
                Console.Write(_icon);
            }

            //Reset console text color to be default color
            Console.ForegroundColor = Engine.DefaultColor;
        }
Ejemplo n.º 2
0
 public override void Draw()
 {
     Raylib.DrawCircleLines(
         (int)GlobalPosition.X,
         (int)GlobalPosition.Y,
         Radius,
         Color.RED);
 }
Ejemplo n.º 3
0
 public void Draw()
 {
     Raylib.DrawCircle((int)Position.X, (int)Position.Y, Size, this.GetColor());
     Raylib.DrawText(this.Health.ToString(), (int)Position.X - (2 * this.Health.ToString().Length), (int)Position.Y - 4, 6, this.GetHighlightColor());
     if (Selected)
     {
         Raylib.DrawCircleLines((int)Position.X, (int)Position.Y, Size + 2, this.GetHighlightColor());
     }
 }
Ejemplo n.º 4
0
 public void Render()
 {
     _engine.DoPhysics();
     foreach (var b in _balls)
     {
         b.Update();
         Raylib.DrawCircle(b.Ellipse.X, b.Ellipse.Y, (int)b.Ellipse.Width, b.Ellipse.Fill);
         Raylib.DrawCircleLines(b.Ellipse.X, b.Ellipse.Y, (int)b.Ellipse.Width, Color.WHITE);
     }
 }
Ejemplo n.º 5
0
 public static void DrawCircle(Vector2 Pos, float Radius, Color Clr, bool Outline = true)
 {
     if (Outline)
     {
         Raylib.DrawCircleLines((int)Pos.X, (int)Pos.Y, Radius, Clr);
     }
     else
     {
         Raylib.DrawCircle((int)Pos.X, (int)Pos.Y, Radius, Clr);
     }
 }
Ejemplo n.º 6
0
        public override void Draw()
        {
            Raylib.DrawCircleLines(
                (int)(WorldPosition.X * 32),
                (int)(WorldPosition.Y * 32),
                _collisionRadius * 6,
                Color.WHITE
                );

            _sprite.Draw(_globalTransform);
            base.Draw();
        }
Ejemplo n.º 7
0
        public void Draw()
        {
            Raylib.DrawCircle(
                (int)Pos.X,
                (int)Pos.Y,
                size,
                Color.DARKPURPLE
                );

            Raylib.DrawCircleLines(
                (int)Pos.X,
                (int)Pos.Y,
                size + 2,
                Color.PURPLE
                );
        }
Ejemplo n.º 8
0
        public virtual void Draw()
        {
            Raylib.DrawCircleLines(
                (int)GlobalPosition.X,
                (int)GlobalPosition.Y,
                _collisionRadius, color);

            Raylib.DrawLine(
                (int)GlobalPosition.X,
                (int)GlobalPosition.Y,
                (int)(GlobalPosition.X + (Forward.X * 50)),
                (int)(GlobalPosition.Y + (Forward.Y * 50)),
                Color.RED);

            _sprite.Draw(_globalTransform);
        }
Ejemplo n.º 9
0
        public void Draw()
        {
            Raylib.DrawCircle(
                (int)Position.X,
                (int)Position.Y,
                Size,
                this.GetColor()
                );

            if (Selected)
            {
                Raylib.DrawCircleLines(
                    (int)Position.X,
                    (int)Position.Y,
                    Size + 2,
                    this.GetHighlightColor()
                    );
            }
        }