Ejemplo n.º 1
0
        public void add_arrow(int team, int speed, Vector2[] waypoints)
        {
            Flashing_Worldmap_Object worldmap_object = new Worldmap_Arrow(team, speed, waypoints);

            worldmap_object.stereoscopic = Config.MAP_UNITS_DEPTH;
            Worldmap_Objects.Add(worldmap_object);
        }
Ejemplo n.º 2
0
 protected void update_movement()
 {
     if (moving)
     {
         Waypoint_Length += Movement_Speed;
         loc              = Worldmap_Arrow.point_along_route(Waypoint_Length, Waypoints);
         if (loc == Waypoints[Waypoints.Length - 1])
         {
             if (Unit_Queue.Count == 0)
             {
                 Highlighted = false;
             }
             Waypoints = null;
             Scene_Map.refresh_map_sprite(Unit_Sprite, Team, Filename, false);
             process_unit_queue();
             return;
         }
         else if (Unit_Queue.Count > 0 && Unit_Queue[0].Key == Worldmap_Unit_Queue.Remove &&
                  Worldmap_Arrow.point_along_route(Waypoint_Length, Waypoints) == Waypoints[Waypoints.Length - 1])
         {
             remove((bool)Unit_Queue[0].Value);
             Unit_Queue.RemoveAt(0);
         }
         update_movement_facing();
     }
 }
Ejemplo n.º 3
0
        protected void update_movement_facing()
        {
            float angle = Worldmap_Arrow.angle_along_route(Waypoint_Length, Waypoints);
            int   deg   = ((int)(360 - angle * 360 / MathHelper.TwoPi)) % 360;

            if (deg > 45 && deg < 135)
            {
                Facing = 8;
            }
            else if (deg >= 135 && deg <= 225)
            {
                Facing = 4;
            }
            else if (deg > 225 && deg < 315)
            {
                Facing = 2;
            }
            else
            {
                Facing = 6;
            }
        }