示例#1
0
        public void UpdateRoleSight(EntityInfo roleInfo, S2CSight.Types.ESightOpt opt)
        {
            DicRole.TryGetValue(roleInfo.Id, out var ellipse);

            switch (opt)
            {
            case S2CSight.Types.ESightOpt.EnterSight:
                if (ellipse == null)
                {
                    AddToCanvas(roleInfo.Id, roleInfo.X, roleInfo.Y); break;
                }
                EllipseList.Enqueue(new MoveStruct {
                    ellipse = ellipse, x = roleInfo.X, y = roleInfo.Y
                });
                break;

            case S2CSight.Types.ESightOpt.LeaveSight:
                WillBeRemoveEllipseList.Enqueue(new MoveStruct {
                    ellipse = ellipse, x = roleInfo.X, y = roleInfo.Y
                });
                break;

            default: break;
            }
        }
示例#2
0
 public static void UpdateRoleSight(EntityInfo roleInfo, S2CSight.Types.ESightOpt opt)
 {
     _mainWindow.UpdateRoleSight(roleInfo, opt);
 }