Exemple #1
0
        public void UpdateGhostLocation(Location location)
        {
            if (location == null)
            {
                return;
            }

            GhostDisplay.SetPosition(location.X, location.Y, location.Theta);
            GhostDisplay.SetSpeed(location.Vx, location.Vy, location.Vtheta);
        }
Exemple #2
0
        public void InitGhost()
        {
            PolygonExtended robotShape = new PolygonExtended();

            robotShape.polygon.Points.Add(new Point(-0.15, -0.15));
            robotShape.polygon.Points.Add(new Point(0.15, -0.15));
            robotShape.polygon.Points.Add(new Point(0.15, -0.05));
            robotShape.polygon.Points.Add(new Point(0.25, 0));
            robotShape.polygon.Points.Add(new Point(0.15, 0.05));
            robotShape.polygon.Points.Add(new Point(0.15, 0.15));
            robotShape.polygon.Points.Add(new Point(-0.15, 0.15));
            robotShape.polygon.Points.Add(new Point(-0.15, -0.15));
            GhostDisplay = new RobotDisplay(robotShape, System.Drawing.Color.DarkSlateGray, 0.4);
            GhostDisplay.SetPosition(0, 0, 0);
        }
Exemple #3
0
        public void InitRobot()
        {
            PolygonExtended robotShape = new PolygonExtended();

            robotShape.polygon.Points.Add(new Point(-0.15, -0.15));
            robotShape.polygon.Points.Add(new Point(0.15, -0.15));
            robotShape.polygon.Points.Add(new Point(0.15, -0.05));
            robotShape.polygon.Points.Add(new Point(0.25, 0));
            robotShape.polygon.Points.Add(new Point(0.15, 0.05));
            robotShape.polygon.Points.Add(new Point(0.15, 0.15));
            robotShape.polygon.Points.Add(new Point(-0.15, 0.15));
            robotShape.polygon.Points.Add(new Point(-0.15, -0.15));
            RobotDisplay = new RobotDisplay(robotShape, System.Drawing.Color.Red, 1);
            RobotDisplay.SetPosition(0, 0, 0);
        }
Exemple #4
0
        public void InitOpponent(int robotId)
        {
            PolygonExtended robotShape = new PolygonExtended();

            robotShape.polygon.Points.Add(new Point(-0.25, -0.25));
            robotShape.polygon.Points.Add(new Point(0.25, -0.25));
            robotShape.polygon.Points.Add(new Point(0.2, 0));
            robotShape.polygon.Points.Add(new Point(0.25, 0.25));
            robotShape.polygon.Points.Add(new Point(-0.25, 0.25));
            robotShape.polygon.Points.Add(new Point(-0.25, -0.25));
            RobotDisplay rd = new RobotDisplay(robotShape, System.Drawing.Color.Blue, 1);

            rd.SetPosition(0, 0, 0);
            OpponentDisplayDictionary.Add(robotId, rd);
        }