Exemplo n.º 1
0
        public override void update()
        {
            Map_Info_State map_ready = map_check();

            if (map_ready == Map_Info_State.Refresh)
            {
                set_images();
            }
            if (Global.player.is_true_on_left() && is_self_on_left && X_Move_List.Count == 0)
            {
                if (!Offscreen)
                {
                    move_off_left();
                }
                else if (map_ready != Map_Info_State.Offscreen)
                {
                    move_on_right();
                }
            }
            else if (Global.player.is_true_on_right() && is_self_on_right && X_Move_List.Count == 0)
            {
                if (!Offscreen)
                {
                    move_off_right();
                }
                else if (map_ready != Map_Info_State.Offscreen)
                {
                    move_on_left();
                }
            }
            update_position();
            refresh();
        }
Exemplo n.º 2
0
        public override void update()
        {
            Map_Info_State map_ready = map_check();

            if (map_ready == Map_Info_State.Refresh && Offscreen)
            {
                move_on();
            }
            if (!Offscreen)
            {
                if (is_on_top && is_on_right && Y_Move_List.Count == 0)
                {
                    move_off();
                }
                else if ((is_on_bottom || (Global.player.is_true_on_left() && is_self_on_bottom)) && Y_Move_List.Count == 0)
                {
                    move_off();
                }
            }
            else
            {
                if (Y_Move_List.Count == 0 && map_ready != Map_Info_State.Offscreen)
                {
                    move_on();
                }
            }
            update_position();
            refresh();
            // reset images //Yeti
        }
        public override void update()
        {
            Map_Info_State map_ready = map_check();

            update_position_switch();
            if (map_ready == Map_Info_State.Refresh)
            {
                set_images();
            }
            update_position(map_ready);
            refresh();
        }
 protected virtual void update_position(Map_Info_State map_ready)
 {
     if (X_Move_List.Count > 0)
     {
         loc.X = X_Move_List.pop();
     }
     if (Y_Move_List.Count > 0)
     {
         loc.Y = Y_Move_List.pop();
         if (Y_Move_List.Count == 0 && map_ready == Map_Info_State.Onscreen)
         {
             set_images();
         }
     }
 }
 protected override void update_position(Map_Info_State map_ready)
 {
     if (X_Move_List.Count > 0 && map_ready == Map_Info_State.Onscreen)
     {
         X_Move_List.pop();
         if (X_Move_List.Count == 0)
         {
             fix_position();
         }
     }
     if (Y_Move_List.Count > 0)
     {
         Y_Move_List.pop();
     }
 }