public MapInterActiveObjectInfo(FlyPointRef _flyPoint) { serverInstanceID = _flyPoint.id; name = _flyPoint.name; typeID = ObjectType.FlyPoint; position = _flyPoint.sceneVector; typeName = _flyPoint.desName; iconName = "Icon_chuansong"; }
public static FlyPoint CreateDummy(FlyPointRef _info) { GameObject newGO = new GameObject("Dummy FlyPoint[" + _info.id + "]"); newGO.tag = "FlyPoint"; FlyPoint flyPoint = newGO.AddComponent <FlyPoint>(); newGO.SetMaskLayer(LayerMask.NameToLayer("Static")); flyPoint.id = _info.id; flyPoint.refData = _info; flyPoint.isDummy_ = true; GameCenter.curGameStage.PlaceGameObjectFromStaticRef(flyPoint, (int)_info.sceneVector.x, (int)_info.sceneVector.z, _info.direction, (int)_info.sceneVector.y); GameCenter.curGameStage.AddObject(flyPoint); return(flyPoint); }
public override bool Exec(Actor _actor) { FlyPointRef flyPointRef = ConfigMng.Instance.GetFlyPointRef(type); if (flyPointRef == null) { GameSys.LogError("取不到传送点的配置信息!命令执行中断!"); return(true); } MainPlayer p = _actor as MainPlayer; if (p == null) { return(true); } FlyPoint fp = GameCenter.curGameStage.GetObject(ObjectType.FlyPoint, type) as FlyPoint; FlyPoint.OnMainPlayerTriggerFlyPoint(p, fp); return(true); }
void OnClickWordMap(GameObject _obj) { if (wordMapGoObj != null) { WordMapItem item = _obj.transform.GetComponent <WordMapItem>(); if (item != null) { MapGo mapGo = wordMapGoObj.GetComponent <MapGo>(); if (mapGo != null) { //FlyPointRef Ref = ConfigMng.Instance.GetFlyPointRef(item.ID); FlyPointRef Ref = ConfigMng.Instance.GetFlyPointRef(GameCenter.mainPlayerMng.MainPlayerInfo.SceneID, item.sceneID); if (Ref == null) { Ref = ConfigMng.Instance.GetFlyPointRef(item.ID); } mapGo.Init(Ref.targetVector, item.sceneID); } } wordMapGoObj.SetActive(true); wordMapGoObj.transform.localPosition = _obj.transform.localPosition; } }