Exemplo n.º 1
0
 public virtual bool CompareTo(PeMap.ILabel label)
 {
     if (label is TownLabel)
     {
         TownLabel townlabel = (TownLabel)label;
         if (townLabelType == townlabel.townLabelType)
         {
             if (null != this.name && null != townlabel.name)
             {
                 return(this.pos == townlabel.pos && this.name.Equals(townlabel.name));
             }
             else if (this.name == null && townlabel.name == null)
             {
                 return(this.pos == townlabel.pos);
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 public bool CompareTo(PeMap.ILabel label)
 {
     if (label is ServantDeadLabel)
     {
         ServantDeadLabel servantDeadlabel = (ServantDeadLabel)label;
         if (this.servantId == servantDeadlabel.servantId)
         {
             return(true);
         }
         return(false);
     }
     return(false);
 }
Exemplo n.º 3
0
 public bool CompareTo(PeMap.ILabel label)
 {
     if (label is ReviveLabel)
     {
         ReviveLabel reviveLabel = (ReviveLabel)label;
         if (this.pos == reviveLabel.pos)
         {
             return(true);
         }
         return(false);
     }
     return(false);
 }
Exemplo n.º 4
0
 public bool CompareTo(PeMap.ILabel label)
 {
     if (label is MapCmpt)
     {
         MapCmpt mapCmptLabel = (MapCmpt)label;
         if (mapCmptLabel == this)
         {
             return(true);
         }
         return(false);
     }
     return(false);
 }
Exemplo n.º 5
0
 public void Init()
 {
     this.e_OnMouseOver     = null;
     this.e_OnClick         = null;
     this.m_WorldMapConvert = 1f;
     this.m_Label           = null;
     this.inMinMap          = false;
     this.m_NpcID           = -1;
     SetColor(new Color32(255, 255, 255, 255));
     SetEnableClick(true);
     SetFriendlyLevelIcon(-1);
     mSpr.depth = 0;
     transform.localRotation = Quaternion.identity;
 }
Exemplo n.º 6
0
 public static bool Remove(Vector3 pos)
 {
     PeMap.ILabel pl = PeMap.LabelMgr.Instance.Find(item =>
     {
         DungeonEntranceLabel l = item as DungeonEntranceLabel;
         if (l != null && l.pos == pos)
         {
             return(true);
         }
         return(false);
     });
     if (pl != null)
     {
         return(PeMap.LabelMgr.Instance.Remove(pl));
     }
     return(false);
 }
Exemplo n.º 7
0
 public static bool ContainsIcon(Vector3 pos)
 {
     PeMap.ILabel pl = PeMap.LabelMgr.Instance.Find(item =>
     {
         ColonyLabel l = item as ColonyLabel;
         if (l != null && l.pos == pos)
         {
             return(true);
         }
         return(false);
     });
     if (pl != null)
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 8
0
 public static bool HasTownLabel(Vector3 pos)
 {
     PeMap.ILabel pl = PeMap.LabelMgr.Instance.Find(item =>
     {
         TownLabel l = item as TownLabel;
         if (l != null && l.pos == pos)
         {
             return(true);
         }
         return(false);
     });
     if (pl != null)
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 9
0
    public static new void Remove(Vector3 pos)
    {
        PeMap.ILabel pl = PeMap.LabelMgr.Instance.Find(item =>
        {
            UnknownLabel l = item as UnknownLabel;
            if (l != null && l.pos == pos)
            {
                return(true);
            }
            return(false);
        });

        if (pl == null)
        {
            return;
        }
        PeMap.LabelMgr.Instance.Remove(pl);
    }
Exemplo n.º 10
0
 public virtual bool CompareTo(PeMap.ILabel label)
 {
     if (label is DungeonEntranceLabel)
     {
         DungeonEntranceLabel dLabel = (DungeonEntranceLabel)label;
         if (null != this.name && null != dLabel.name)
         {
             return(this.pos == dLabel.pos && this.name.Equals(dLabel.name));
         }
         else
         {
             return(this.pos == dLabel.pos);
         }
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 11
0
    bool RemoveGetableLabel(int missionID, PeMap.ILabel label)
    {
        if (label.GetType() != PeMap.ELabelType.Mission)
        {
            return(false);
        }
        if (!(label is MissionLabel))
        {
            return(false);
        }

        MissionLabel msLabel = label as MissionLabel;

        if (msLabel.m_type != MissionLabelType.misLb_unActive)
        {
            return(false);
        }

        return(msLabel.m_missionID == missionID);
    }
Exemplo n.º 12
0
 public bool CompareTo(PeMap.ILabel label)
 {
     if (label is MissionLabel)
     {
         MissionLabel missionLabel = (MissionLabel)label;
         //lz-2016.06.24 会有多个label的missionid,type,postion都一样,只是半径不一样比如421任务,所以这里再加入半径判断
         if (this.m_missionID == missionLabel.m_missionID &&
             this.m_type == missionLabel.m_type &&
             missionLabel.m_postion == m_postion &&
             missionLabel.m_raidus == m_raidus)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 13
0
    public void SetLabel(PeMap.ILabel _label, bool _inMinMap = false)
    {
        this.Init();
        m_Label  = _label;
        inMinMap = _inMinMap;

        if (m_Label == null)
        {
            return;
        }

        UpdateIcon();

        if (_label is TownLabel)
        {
            if (Pathea.PeGameMgr.IsAdventure)
            {
                TownLabel townLabel  = _label as TownLabel;
                int       colorIndex = townLabel.GetAllianceColor();
                if (colorIndex >= 0 && colorIndex < AllyColor.AllianceCols.Length)
                {
                    Color32 color32 = AllyColor.AllianceCols[colorIndex];
                    SetColor(color32);
                }
                SetFriendlyLevelIcon(townLabel.GetFriendlyLevel());
            }
        }
        else if (_label is MissionLabel)
        {
            MissionLabel missionLabel = _label as MissionLabel;
            SetColor(missionLabel.GetMissionColor());
        }

        //SetEnableClick(m_Label.GetType()!= PeMap.ELabelType.Mission);
        SetEnableClick(true);

        UpdateRadiusSize();
        // label depth 处理

        //从高到底:User,Mission,NPC,Revive,Vehicle,Mark,FastTravel
        switch (_label.GetType())
        {
        case PeMap.ELabelType.FastTravel:
            mSpr.depth = 1;
            break;

        case PeMap.ELabelType.Mark:
            mSpr.depth = 2;
            break;

        case PeMap.ELabelType.Vehicle:
            mSpr.depth = 3;
            break;

        case PeMap.ELabelType.Revive:
            mSpr.depth = 4;
            break;

        case PeMap.ELabelType.Npc:
            mSpr.depth = 5;
            break;

        case PeMap.ELabelType.Mission:
            //lz-2016.10.11 如果有任务覆盖的情况,主线在支线上面
            MissionLabel missionLabel = _label as MissionLabel;
            mSpr.depth = MissionManager.IsMainMission(missionLabel.m_missionID)?7:6;
            break;

        case PeMap.ELabelType.User:
            mSpr.depth = 8;
            break;

        default:
            mSpr.depth = 0;
            break;
        }
    }
Exemplo n.º 14
0
 public void SetLabel(PeMap.ILabel label, EArrowType arrow_type)
 {
     //m_ArrowType = arrow_type;
     trackLabel = label;
 }