Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
0
    void UpdateReviveLabel()
    {
        if (m_Label == null || m_Label.GetType() != PeMap.ELabelType.Revive)
        {
            return;
        }

        ReviveLabel revLabel = m_Label as ReviveLabel;

        if (revLabel != null && Vector3.Distance(revLabel.GetPos(), Pathea.PeCreature.Instance.mainPlayer.position) < 50)
        {
            ReviveLabel.Mgr.Instance.Remove(revLabel);
        }
    }
Ejemplo n.º 3
0
    void BtnClick_OnCancel()
    {
        if (currentState == ReivieState.Reivie_Servant || currentEntity == null)
        {
            Hide();
            return;
        }
        if (!PeGameMgr.IsMulti)
        {
            ReviveLabel label = new ReviveLabel();
            label.pos = currentEntity.position;
            ReviveLabel.Mgr.Instance.Add(label);

            if (RandomDungenMgrData.InDungeon)
            {
                bool reviveSuc = DoRevive(true);
                if (reviveSuc)
                {
                    currentEntity.position = RandomDungenMgrData.revivePos;
                    Hide();
                }
                return;
            }

            //lz-2016.08.03 空对象
            if (null != MissionManager.Instance)
            {
                MissionManager.Instance.RemoveFollowTowerMission();
            }
            DoRevive(true);
            Vector3 revivePos;
            if (SingleGameStory.curType == SingleGameStory.StoryScene.DienShip0)
            {
                revivePos = new Vector3(14798.09f, 20.98818f, 8246.396f);
            }
            else if (SingleGameStory.curType == SingleGameStory.StoryScene.L1Ship)
            {
                revivePos = new Vector3(9649.354f, 90.488f, 12744.77f);
            }
            else if (SingleGameStory.curType == SingleGameStory.StoryScene.PajaShip)
            {
                revivePos = new Vector3(1593.53f, 148.635f, 8022.03f);
            }
            else
            {
                revivePos = GetNearFastTrvalPos(currentEntity.position);
            }
            Pathea.FastTravelMgr.Instance.TravelTo(revivePos);
        }
        else
        {
            Vector3 warpPos = Vector3.zero;
            if (RandomDungenMgrData.InDungeon)
            {
                warpPos = RandomDungenMgrData.revivePos;
            }
            else if (PeGameMgr.IsMultiCoop)
            {
                warpPos = GetNearFastTrvalPos(currentEntity.position);
            }
            else
            {
                if (PeGameMgr.IsCustom)
                {
                    warpPos = PlayerNetwork.mainPlayer.GetCustomModePos();
                }
                else
                {
                    IntVector2 posXZ = VArtifactUtil.GetSpawnPos();
                    warpPos = new Vector3(posXZ.x, VFDataRTGen.GetPosTop(posXZ), posXZ.y);
                }
            }

            PlayerNetwork.mainPlayer.RPCServer(EPacketType.PT_InGame_PlayerReset, warpPos);
            PlayerNetwork.mainPlayer.RequestChangeScene(0);
        }

        Hide();
    }