Example #1
0
 public void Draw()
 {
     if (_selected)
     {
         SwinGame.DrawCircle(Color.Green, _location.X * 32 + 16f, _location.Y * 32 + 16f, 16f);
     }
     SwinGame.DrawBitmap(Directory.GetCurrentDirectory() + "\\Resources\\RoverResources\\Rover.png", _location.X * 32, _location.Y * 32);
 }
        public override void DrawOutline()
        {
            SwinGame.DrawCircle(Color.Black, x1, y1, 3);
            SwinGame.DrawCircle(Color.Black, x1, y1, 4);

            SwinGame.DrawCircle(Color.Black, x2, y2, 3);
            SwinGame.DrawCircle(Color.Black, x2, y2, 4);
        }
 public override void Draw()
 {
     if (_isActive && _isvisible)
     {
         SwinGame.DrawCircle(Color.Green, DrawX, DrawY, Size);
     }
     else if (!_isActive)
     {
         _isvisible = false;
     }
 }
Example #4
0
 public override void Draw()
 {
     if (Outline)
     {
         SwinGame.DrawCircle(Color, X, Y, Radius);
     }
     else
     {
         SwinGame.FillCircle(Color, X, Y, Radius);
     }
 }
Example #5
0
		/// <summary>
		/// Draw this instance, draw range when selected, draw attack when attacking.
		/// </summary>
        public override void Draw()
        {
            if (_selected)
            {
                DrawRange();
            }
            if (_attackTime > 0)
            {
                SwinGame.DrawCircle(Color.AliceBlue, _position[0], _position[1], _range);
            }
            SwinGame.FillCircle(Color.Aqua, _position[0], _position[1], _size);
        }
Example #6
0
        public override void Draw()
        {
            if (_visible)
            {
                if (_thrustAnimActive)
                {
                    DrawThrust();
                }

                //Here's where the actual ship gets drawn
                double directionInRadians = (Math.PI * _direction) / 180;

                float x1 = _x + (SHIP_HEIGHT * (float)Math.Sin(directionInRadians));
                float y1 = _y - (SHIP_HEIGHT * (float)Math.Cos(directionInRadians));

                float x2 = _x + (SHIP_WIDTH * (float)Math.Cos(directionInRadians));
                float y2 = _y + (SHIP_WIDTH * (float)Math.Sin(directionInRadians));

                float x3 = _x - (SHIP_WIDTH * (float)Math.Cos(directionInRadians));
                float y3 = _y - (SHIP_WIDTH * (float)Math.Sin(directionInRadians));

                _shape = SwinGame.CreateTriangle(x1, y1, x2, y2, x3, y3);

                SwinGame.FillTriangle(_colour, _shape);
            }
            if (_visible || (_mercyTimer > 0))
            {
                _missiles.DrawAll();
            }
            //Draws life counter next to ship during the mercy period after respawning
            if ((_mercyTimer > 0) && (LivesEnabled))
            {
                SwinGame.DrawText(string.Format("x " + _lives), _colour, SwinGame.FontNamed("tinyFont"), _x + 40, _y - 10);
            }
            //Draws explosion animation if the player is dead
            if (_respawnTimer > RESPAWN_LENGTH - 90)
            {
                if (_respawnTimer % 10 >= 5)
                {
                    SwinGame.DrawCircle(Color.Red, _x, _y, 10);
                    SwinGame.DrawCircle(_colour, _x, _y, 20);
                }
                if (_respawnTimer % 10 < 5)
                {
                    SwinGame.DrawCircle(_colour, _x, _y, 15);
                    SwinGame.DrawCircle(Color.Red, _x, _y, 25);
                }
            }
        }
Example #7
0
 public void Draw(Color colour)
 {
     if (!_inControl)
     {
         for (int i = 0; i < 32; i++)
         {
             for (int j = 0; j < 18; j++)
             {
                 if (_forces[i, j].Magnitude != 0)
                 {
                     SwinGame.DrawCircle(colour, i * 60 + 30, j * 60 + 30, 2);
                     SwinGame.DrawLine(colour, i * 60 + 30, j * 60 + 30, _forces[i, j].X + (i * 60) + 30, _forces[i, j].Y + (j * 60) + 30);
                 }
             }
         }
     }
 }
Example #8
0
        public override void Draw()
        {
            SwinGame.FillRectangle(Color.White,
                                   Pos.X + Camera.Pos.X,
                                   Pos.Y + _height / 2 - 1 + Camera.Pos.Y,
                                   _width,
                                   2);
            SwinGame.FillRectangle(Color.White,
                                   Pos.X + Camera.Pos.X,
                                   Pos.Y + Camera.Pos.Y,
                                   4,
                                   _height);
            SwinGame.FillRectangle(Color.White,
                                   Pos.X + Camera.Pos.X + _width,
                                   Pos.Y + Camera.Pos.Y,
                                   4,
                                   _height);

            foreach (Player p in _a3RData.Players)
            {
                SwinGame.FillCircle(Color.White,
                                    Camera.Pos.X + Pos.X + (_width * (p.Pos.X / (float)_a3RData.Terrain.Map.Length)),
                                    Camera.Pos.Y + Pos.Y + _height / 2 - 1,
                                    3);
            }
            Player s = _a3RData.SelectedPlayer;

            SwinGame.DrawCircle(Color.Purple,
                                Camera.Pos.X + Pos.X + (_width * (s.Pos.X / (float)_a3RData.Terrain.Map.Length)),
                                Camera.Pos.Y + Pos.Y + _height / 2 - 1,
                                5);

            SwinGame.DrawCircle(Color.Orange,
                                Camera.Pos.X + Pos.X +
                                (_width * (s.Character.LastProjectilePosition.X / (float)_a3RData.Terrain.Map.Length)),
                                Camera.Pos.Y + Pos.Y + _height / 2 - 1,
                                3);
        }
Example #9
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////


        public override void Draw()
        {
            SwinGame.FillEllipse(_colour, _position.X - (_size / 2), _position.Y - (_size / 2), _size, _size);

            if (_selected)
            {
                SwinGame.DrawEllipse(Color.White, _position.X - (_size / 2), _position.Y - (_size / 2), _size, _size);
            }

            SwinGame.DrawLine(_colour, SwinGame.LineFromVector(_position.X, _position.Y, SwinGame.VectorFromAngle(_angleFacing, 100)));
            SwinGame.DrawLine(_colour, SwinGame.LineFromVector(_position.X, _position.Y, SwinGame.VectorFromAngle(_angleFacing + (_fov / 2), 100)));
            SwinGame.DrawLine(_colour, SwinGame.LineFromVector(_position.X, _position.Y, SwinGame.VectorFromAngle(_angleFacing - (_fov / 2), 100)));

            //SwinGame.DrawText(SwinGame.VectorAngle(_movementVector) + "", Color.White, _position.X, _position.Y - 50);
            //SwinGame.DrawText(_movementVector.Magnitude + "", Color.White, _position.X, _position.Y - 10);

            SwinGame.DrawLine(Color.White, _position.X, _position.Y, _movementVector.X + _position.X, _movementVector.Y + _position.Y);

            SwinGame.DrawLine(Color.White, _position.X, _position.Y, (_movementVector.X * 7) + _position.X, (_movementVector.Y * 7) + _position.Y);

            float normalX = (SwinGame.VectorNormal(_movementVector).X *(12));
            float normalY = (SwinGame.VectorNormal(_movementVector).Y *(12));

            SwinGame.DrawLine(Color.White, _position.X + normalX, _position.Y + normalY, (_movementVector.X * 7) + _position.X + normalX, (_movementVector.Y * 7) + _position.Y + normalY);
            SwinGame.DrawLine(Color.White, _position.X - normalX, _position.Y - normalY, (_movementVector.X * 7) + _position.X - normalX, (_movementVector.Y * 7) + _position.Y - normalY);

            SwinGame.DrawLine(_colour, _destination.X - 3, _destination.Y, _destination.X + 3, _destination.Y);
            SwinGame.DrawLine(_colour, _destination.X, _destination.Y - 3, _destination.X, _destination.Y + 3);

            Color temp = SwinGame.RGBAColor(_colour.R, _colour.G, _colour.B, _colour.A);

            SwinGame.DrawCircle(temp, _enLastSeen, _size);

            SwinGame.DrawText(_health + "", Color.White, _position);

            //_movementManager.Draw(_colour);
        }
Example #10
0
        public void DrawPoints()
        {
            int x = _rectangle._x;
            int y = _rectangle._y;
            int w = _rectangle._w;
            int h = _rectangle._h;

            SwinGame.DrawRectangle(SwinGame.ColorBlack(), x - w, y - h, w * 2, h * 2);
            // SwinGame.DrawRectangle(SwinGame.ColorBlack(), _rectangle._x - 1 - _rectangle._w , _rectangle._y - 1 - _rectangle._h, 2 + (_rectangle._w *2),2+( _rectangle._h *2));
            //SwinGame.DrawRectangle(SwinGame.ColorWhite(), _rectangle._x - _rectangle._w, _rectangle._y - _rectangle._h, _rectangle._w *2, _rectangle._h *2);

            foreach (Point pt in ptList)
            {
                SwinGame.DrawCircle(SwinGame.ColorBlack(), pt._x, pt._y, 1);
            }

            if (divided)
            {
                NorthWest.DrawPoints();
                NorthEast.DrawPoints();
                SouthWest.DrawPoints();
                SouthEast.DrawPoints();
            }
        }
Example #11
0
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color.Black, this.X, this.Y, _radius + 2);
 }
Example #12
0
 /// <summary>
 /// Draw the range of the tower
 /// </summary>
 public void DrawRange()
 {
     SwinGame.DrawCircle(Color.Grey, _position[0], _position[1], _range);
 }
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color.Black, this.X, this.Y, 2);
     SwinGame.DrawCircle(Color.Black, this.X + _length, this.Y, 2);
 }
Example #14
0
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color.Black, X, Y, _radius);
     SwinGame.DrawCircle(Color.Black, X, Y, _radius + 1);
     SwinGame.DrawCircle(Color.Black, X, Y, _radius + 2);
 }
Example #15
0
 public bool IsAt(Point2D point)
 {
     SwinGame.DrawCircle(Color.Black, _hitBox);
     return(SwinGame.PointInCircle(point, _hitBox));
 }
Example #16
0
 public virtual void Draw()
 {
     SwinGame.DrawBitmap(MyBitmap(), _position.X, _position.Y);
     SwinGame.DrawCircle(Color.Black, _hitBox);
 }
Example #17
0
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color.Black, X, Y, 5);
     SwinGame.DrawCircle(Color.Black, _XFinal, _YFinal, 5);
 }
Example #18
0
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color.Black, (PosX), (PosY), 20);
     SwinGame.DrawCircle(Color.Black, PosXEnd, PosYEnd, 20);
 }
Example #19
0
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color.Black, PosX, PosY, (_radius + 2));
 }
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color, X, Y, 3);
     SwinGame.DrawCircle(Color, _x2, _y2, 3);
 }
Example #21
0
 //
 //
 public void DrawOutline()
 {
     SwinGame.DrawCircle(Color.DeepPink, _locationX + 100 / 2 - 2, _locationY + 100 / 2 - 2, Radius + 4);
 }
Example #22
0
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color.Black, X, Y, 2);
 }
Example #23
0
 public override void DrawOutline()
 {
     SwinGame.DrawCircle(Color, X - 1, Y - 1, _radius + 2);
 }