public override void Leave() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.AddVisitorToEntryQueuePlaceHolderReply, this.OnAddVisitorToEntryQueuePlaceHolderReply); MessageManager.GetInstance().UnRegist((int)UFrameBuildinMessage.Arrived, this.OnArrived); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.BroadcastForwardOneStepInEntryGateQueue, OnBroadcastForwardOneStepInExitGateQueue); base.Leave(); }
public override void Leave() { MessageManager.GetInstance().UnRegist((int)UFrameBuildinMessage.Arrived, this.OnArrived); base.Leave(); }
public override void Enter(int preStateName) { base.Enter(preStateName); var entity = (this.fsmCtr as FSMMachineShuttle).ownerEntity; DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateShuttleGobackCalcPath.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "Shuttle_{0}_{1}_{2}", entity.entityID, (ShuttleState)this.preStateName, (ShuttleState)this.stateName); isStateShuttleGobackDynamicPath = false; MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, this.OnArrived); MessageManager.GetInstance().Regist((int)GameMessageDefine.BroadcastAfterExtendSceneAndModifiedPath, this.OnBroadcastAfterExtendSceneAndModifiedPath); //var cfgPath = PathManager.GetInstance().GetPath(Config.globalConfig.getInstace().Path_ShuttleGobackDynamic); //var pathList = new List<Vector3>(); //pathList.Add(entity.position); //pathList.AddRange(cfgPath); //entity.followPath.Init(entity, pathList.ToArray(), pathList[0], 0, entity.moveSpeed, false); //entity.followPath.Run(); var cfgPathStatic = PathManager.GetInstance().GetPath(Config.globalConfig.getInstace().Path_ShuttleGobackStatic); var cfgPathDynamic = PathManager.GetInstance().GetPath(Config.globalConfig.getInstace().Path_ShuttleGobackDynamic); //var pathList = new List<Vector3>(); entity.pathList.Clear(); entity.pathList.AddRange(cfgPathStatic); entity.pathList.Add(cfgPathDynamic[0]); entity.followPath.Init(entity, entity.pathList, entity.pathList[0], 0, entity.moveSpeed, false); entity.followPath.Run(); }
public override void Init() { currSceneID = playerData.playerZoo.currSceneID; sortGateIDs = GlobalDataManager.GetInstance().logicTableEntryGate.GetSortGateIDs(currSceneID); trigerLoadLittleZooIDs = new List <int>(); parkingCell = GlobalDataManager.GetInstance().logicTableParkingData.GetParkingCell(currSceneID); ticketCell = GetTicketCell(); InitLeaveSceneCD(); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetParkingProfitLevelOfPlayerData, this.OnSetParkingProfitLevelOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetParkingSpaceLevelOfPlayerData, this.OnSetParkingSpaceLevelOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetParkingEnterCarSpawnLevelOfPlayerData, this.OnSetParkingEnterCarSpawnLevelOfPlayerData); //MessageManager.GetInstance().Regist((int)GameMessageDefine.SetCoinOfPlayerData, this.OnSetCoinOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.AddCoinOfPlayerDataMSSC, this.OnSetCoinOfPlayerDataMSSC); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetDiamondOfPlayerData, this.OnSetDiamondOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetStarOfPlayerData, this.OnSetStarOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetLittleZooTicketsLevelPlayerData, this.OnSetLittleZooTicketsLevelPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetLittleZooVisitorLocationLevelOfPlayerData, this.OnSetLittleZooVisitorLocationLevelOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetLittleZooEnterVisitorSpawnLevelOfPlayerData, this.OnSetLittleZooEnterVisitorSpawnLevelOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.OpenNewLittleZoo, this.OnOpenNewLittleZoo); MessageManager.GetInstance().Regist((int)GameMessageDefine.VisitorVisitCDFinshedReply, OnVisitorVisitCDFinshedReply); MessageManager.GetInstance().Regist((int)GameMessageDefine.EntryGateCheckInCDFinshedReply, OnEntryGateCheckGoToZoo); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetAnimalLevel, this.OnSetAnimalLevelData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetEntryGateLevelOfPlayerData, this.OnSetEntryGateLevelOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetEntryGatePureLevelOfPlayerData, this.OnSetEntryGatePureLevelOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.SetEntryGateNumOfPlayerData, this.OnSetEntryGateNumOfPlayerData); MessageManager.GetInstance().Regist((int)GameMessageDefine.IncreaseCrossRoadStageID, this.OnIncreaseCrossRoadStageID); }
public override void Release() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetParkingProfitLevelOfPlayerData, this.OnSetParkingProfitLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetParkingSpaceLevelOfPlayerData, this.OnSetParkingSpaceLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetParkingEnterCarSpawnLevelOfPlayerData, this.OnSetParkingEnterCarSpawnLevelOfPlayerData); //MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetCoinOfPlayerData, this.OnSetCoinOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.AddCoinOfPlayerDataMSSC, this.OnSetCoinOfPlayerDataMSSC); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetDiamondOfPlayerData, this.OnSetDiamondOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetStarOfPlayerData, this.OnSetStarOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetLittleZooTicketsLevelPlayerData, this.OnSetLittleZooTicketsLevelPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetLittleZooVisitorLocationLevelOfPlayerData, this.OnSetLittleZooVisitorLocationLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetLittleZooEnterVisitorSpawnLevelOfPlayerData, this.OnSetLittleZooEnterVisitorSpawnLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.OpenNewLittleZoo, this.OnOpenNewLittleZoo); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.VisitorVisitCDFinshedReply, OnVisitorVisitCDFinshedReply); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.EntryGateCheckInCDFinshedReply, OnEntryGateCheckGoToZoo); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetAnimalLevel, this.OnSetAnimalLevelData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetEntryGateLevelOfPlayerData, this.OnSetEntryGateLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetEntryGatePureLevelOfPlayerData, this.OnSetEntryGatePureLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SetEntryGateNumOfPlayerData, this.OnSetEntryGateNumOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.IncreaseCrossRoadStageID, this.OnIncreaseCrossRoadStageID); trigerLoadLittleZooIDs.Clear(); if (leaveSceneCD != null) { leaveSceneCD.Stop(); leaveSceneCD = null; } Stop(); }
public override void Release() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.LittleZooData, this.OnLittleZooData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.VisitorVisitCDFinshed, this.OnVisitorVisitCDFinshed); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.BroadcastOpenNewLittleZoo, OnBroadcastOpenNewLittleZoo); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.BroadcastLittleZooTicketsLevelPlayerData, OnBroadcastLittleZooTicketsLevelPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.BroadcastLittleZooVisitorLocationLevelOfPlayerData, OnBroadcastLittleZooVisitorLocationLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.BroadcastLittleZooEnterVisitorSpawnLevelOfPlayerData, OnBroadcastLittleZooEnterVisitorSpawnLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.VisitorGetRandomLittleZooApply, OnVisitorGetRandomLittleZooApply); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.VisitorGetVisitSeatApply, OnVisitorGetVisitSeatApply); foreach (var val in littleZooMap.Values) { val.Realse(); } littleZooMap.Clear(); openedLittleZooIDs.Clear(); freeLittleZooIDs.Clear(); wouldGotoLittleZooIDs.Clear(); wouldGotoWeights.Clear(); crossGroupIDs.Clear(); crossLittleZooIDs.Clear(); newLittleZooFlagTrans = null; newLittleZooFlagSp.Release(); Stop(); }
public override void Enter(int preStateName) { base.Enter(preStateName); var entity = (this.fsmCtr as FSMMachineShuttle).ownerEntity; DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateShuttleGotoCalcPath.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "Shuttle_{0}_{1}_{2}", entity.entityID, (ShuttleState)this.preStateName, (ShuttleState)this.stateName); isToStateShuttleGobackCalcPath = false; getOffAccumulativeTime = 0; lastVisitorIdx = 0; isGetOff = false; shuttleVisitorGetOffInterval = Math_F.FloatToInt1000(Config.globalConfig.getInstace().ShuttleVisitorGetOffInterval); MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, this.OnArrived); //var cfgPath = PathManager.GetInstance().GetPath(Config.globalConfig.getInstace().Path_ShuttleGotoStatuc); //var pathList = new List<Vector3>(); //pathList.Add(entity.position); //pathList.AddRange(cfgPath); //entity.followPath.Init(entity, pathList.ToArray(), pathList[0], 0, entity.moveSpeed, false); //entity.followPath.Run(); var cfgPathGoback = PathManager.GetInstance().GetPath(Config.globalConfig.getInstace().Path_ShuttleGobackStatic); entity.pathList.Clear(); //var pathList = new List<Vector3>(); entity.pathList.Add(entity.position); entity.pathList.Add(cfgPathGoback[0]); entity.followPath.Init(entity, entity.pathList, entity.pathList[0], 0, entity.moveSpeed, false); entity.followPath.Run(); }
public override void Leave() { Debug.LogError("home leave"); MessageManager.GetInstance().gameMessageCenter.UnRegist((int)GameMsg.C2C_Return_Login, MessageCallback); returnLogin = false; base.Leave(); }
/// <summary> /// 开启动物 /// </summary> private void OnSetAnimalLevelData(Message obj) { var msg = obj as SetBuyAnimalObjectData; /* 扣钱 扣钱成功后修改商品数量 发送扣钱的通知和商品修改的通知 */ var animalMSS15 = GlobalDataManager.GetInstance().playerData.playerZoo.animalMSS15; Config.animalupCell animalupCell = Config.animalupConfig.getInstace().getCell(msg.goodsID); if (animalMSS15.GetAnimalProp(msg.goodsID).lv >= Config.globalConfig.getInstace().AnimalLvUpLimit) { return; } var expendDelta = LittleZooModule.GetAnimalUpLevelPriceFormula(msg.goodsID); if (!WarpAddCoin(-expendDelta)) { return; } //增加动物数据 Config.buildupCell cellBuildUp = Config.buildupConfig.getInstace().getCell(msg.littleZooID); animalMSS15.AnimalLvUp(msg.goodsID, 1); LittleZooModule.playerAnimalGoToResourceID.TryGetValue(msg.goodsID, out int playerAnimalGoToResourceID); MessageInt.Send((int)GameMessageDefine.AnimalPlayLevelUpEffect, playerAnimalGoToResourceID); GetAddNewAnimalData.Send((int)GameMessageDefine.GetAnimalLevel, msg.goodsID, msg.littleZooID); MessageManager.GetInstance().Send((int)GameMessageDefine.AnimalBuffAlterSucceed); }
public override void Leave() { MessageManager.GetInstance().gameMessageCenter.UnRegist(GameLogic_LoginSuccessed, MessageCallback); luaMsgTable.Dispose(); luaMsgTable = null; base.Leave(); }
public override void Init() { MessageManager.GetInstance().Regist((int)GameMessageDefine.SpawnVisitorFromCar, this.OnSpawnVisitorFromCar); MessageManager.GetInstance().Regist((int)GameMessageDefine.SpawnVisitorFromShip, this.OnSpawnVisitorFromShip); MessageManager.GetInstance().Regist((int)GameMessageDefine.SpawnShuttle, this.OnSpawnShuttle); MessageManager.GetInstance().Regist((int)GameMessageDefine.SpawnVisitorFromGroundParking, this.OnSpawnVisitorFromGroundParking); }
public override void Enter(int preStateName) { //LogWarp.LogError("StateVisitorStayWaitSeat.Enter"); base.Enter(preStateName); isToStateVisitorStayVisitSeat = false; var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; //等待位看向前面 entity.LookAt(entity.position + GlobalDataManager.GetInstance().SceneForward); DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorStayWaitSeat.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName); DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} Play {1}", entity.entityID, Config.globalConfig.getInstace().VisitorIdle); entity.PlayActionAnim(Config.globalConfig.getInstace().VisitorIdle); MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, OnArrived); MessageManager.GetInstance().Regist((int)GameMessageDefine.WaitSeatToVisitSeat, OnWaitSeatToVisitSeat); //以进入就检查是否已经在上一个状态收到观光位WaitSeatToVisitSeat if (entity.isApproveVisitSeat) { GotoVisitSeat(entity, entity.stayBuildingID, entity.indexInVisitQueue); return; } }
public override void Enter(int preStateName) { //LogWarp.LogError("StateVisitorChoseLittleZoo.Enter"); base.Enter(preStateName); var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorChoseLittleZoo.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName); MessageManager.GetInstance().Regist((int)GameMessageDefine.VisitorGetRandomLittleZooReply, OnVisitorGetRandomLittleZooReply); MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, this.OnArrived); isToEnterLittleZooApply = false; isToStateVisitorLeaveNonLittleZoo = false; isToStateVisitorLeaveFromZooEntry = false; isArrivedLittleZoo = false; isArrivedStartOfPath = false; if (preStateName == (int)VisitorState.StayFirstPosInEntryQueue) { isArrivedStartOfPath = true; } var msg = VisitorGetRandomLittleZooApply.Send(entity.entityID, this.preStateName == (int)VisitorState.StayFirstPosInEntryQueue); }
protected void Tick_LeaveSceneCoin(int deltaTimeMs) { var sceneStates = playerData.playerZoo.scenePlayerDataMSS.sceneStates; var msg = BroadcastLeaveSceneCoin.PreSend(); var leaveSceneCoinData = GlobalDataManager.GetInstance().leaveSceneCoinData; bool isAddedCoin = false; for (int i = 0; i < sceneStates.Count; i++) { var sceneState = sceneStates[i]; if ((sceneState.enterCount > 0 || sceneState.sceneId == GameConst.First_SceneID) && sceneState.sceneId != playerData.playerZoo.currSceneID) { var perMinCoin = PlayerDataModule.LeaveScenePerMinCoin(sceneState.sceneId, true); perMinCoin = perMinCoin * deltaTimeMs / 60000; if (perMinCoin > 0) { isAddedCoin = true; playerData.playerZoo.playerCoin.AddCoinByScene(sceneState.sceneId, perMinCoin); msg.AddSceneCoin(sceneState.sceneId, perMinCoin); leaveSceneCoinData.AddCoin(sceneState.sceneId, perMinCoin); } } } if (isAddedCoin) { //发送离开金币收入消息 BroadcastLeaveSceneCoin.Send(); //广播金币收入变化 MessageManager.GetInstance().Send((int)GameMessageDefine.BroadcastCoinOfPlayerDataMSSC); } }
public override void Leave() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.WaitSeatToVisitSeat, OnWaitSeatToVisitSeat); MessageManager.GetInstance().UnRegist((int)UFrameBuildinMessage.Arrived, OnArrived); base.Leave(); }
protected void OnArrived(Message msg) { var _msg = (MessageArrived)msg; var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; //自己的entity if (_msg.followPath.ownerEntity.entityID != entity.entityID) { return; } //到达终点, 游客消失,地上游客地上发车,地下游客地下发车,广告游客什么车都不发 if (_msg.followPath.isArrivedEnd) { if (entity.entityFuncType == (int)EntityFuncType.Visitor_From_Car) { DebugFile.GetInstance().WriteKeyFile("FromUnder_", "{0}", entity.entityID); MessageManager.GetInstance().Send((int)GameMessageDefine.SpawnVisitorCarLeaveZoo); } else if (entity.entityFuncType == (int)EntityFuncType.Visitor_From_GroundParking) { MessageGroundParkingSpace.Send((int)GameMessageDefine.BroadcastLetGroundParingCarLeave, entity.groundParkingGroupID, entity.groundParkingIdx); } // 回POOL EntityManager.GetInstance().RemoveFromEntityMovables(entity); } }
protected void OnArrived(Message msg) { var _msg = (MessageArrived)msg; var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; //自己的entity if (_msg.followPath.ownerEntity.entityID != entity.entityID) { return; } if (_msg.followPath.isArrivedEnd) { EntityManager.GetInstance().RemoveFromEntityMovables(entity); //通知生成离开的汽车 //MessageManager.GetInstance().Send((int)GameMessageDefine.SpawnVisitorCarLeaveZoo); //通知生成离开的汽车 if (entity.entityFuncType == (int)EntityFuncType.Visitor_From_Car) { DebugFile.GetInstance().WriteKeyFile("FromUnder_", "{0}", entity.entityID); MessageManager.GetInstance().Send((int)GameMessageDefine.SpawnVisitorCarLeaveZoo); } } }
public override void Release() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.AddVisitorToExitGateQueueApply, this.OnAddVisitorToExitGateQueueApply); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.BroadcastExitGateLevelOfPlayerData, this.OnBroadcastExitGateLevelOfPlayerData); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SendExitGateCheckinCDFinish, this.OnSendExitGateCheckinCDFinish); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SendExitGateCheckinCDFinishReply, OnSendExitGateCheckinCDFinishReply); //MessageManager.GetInstance().UnRegist((int)GameMessageDefine.BroadcastChangeBuff_SetExitEntryCDVal, // this.OnBroadcastChangeBuffSetExitEntryCDVal); shuttleVisitorQueue.Clear(); //maxShuttleVisitorQueue = 0; maxShuttleInterval = 0; shuttleaccumulativeTime = 0; shuttleVisitorList.Clear(); foreach (var val in exitGates.Values) { val.Realse(); } exitGates.Clear(); broadcastEntityIDs.Clear(); ExitVisitorsNum0 = null; ExitVisitorsNum1 = null; this.Stop(); }
public override void Enter(int preStateName) { base.Enter(preStateName); var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorGotoParking.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName); MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, OnArrived); Vector3 startPos = Vector3.zero; if (entity.entityFuncType == (int)EntityFuncType.Visitor_From_Car) { PathManager.GetInstance().GetPathFirstPos(Config.globalConfig.getInstace().ShuttleVisitorLeavePath, ref startPos); entity.position = startPos; EntityVisitor.GodownPath(entity, Config.globalConfig.getInstace().ShuttleVisitorLeavePath); return; } PathManager.GetInstance().GetPathFirstPos(Config.globalConfig.getInstace().AdvertVisitorLeavePath, ref startPos); entity.position = startPos; EntityVisitor.GodownPath(entity, Config.globalConfig.getInstace().AdvertVisitorLeavePath); }
public override void Enter(int preStateName) { base.Enter(preStateName); var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorGotoGroundParking.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName); MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, OnArrived); #if UNITY_EDITOR if (entity.entityFuncType != (int)EntityFuncType.Visitor_From_GroundParking) { string e = string.Format("{0}这里必须是地面停车场来的游客", entity.entityID); throw new System.Exception(e); } #endif //先走完基路 isFinishedBasePath = false; EntityVisitor.GodownPath(entity, Config.globalConfig.getInstace().GroundParkingVistorBasePath); ////构建去地面停车场的路 //List<Vector3> pathList = null; //var pathUnit = GroundParingSpacePathManager.GetInstance().GetPathUnit(entity.groundParkingGroupID, entity.groundParkingIdx); //if (!GroundParingSpacePathManager.IsExist(pathUnit.visitorBackPath)) //{ // pathList = GroundParingSpacePathManager.GenVisitorBackPath(entity.groundParkingGroupID, entity.groundParkingIdx); // GroundParingSpacePathManager.GetInstance().AddPath(GroundParingSpacePathType.VisitorBackPath, pathUnit, pathList, null); //} //pathList = pathUnit.visitorBackPath; //EntityVisitor.GodownPath(entity, pathList); }
public override void Enter(int preStateName) { base.Enter(preStateName); var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorGotoExitGateEntryQueue.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName); MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, this.OnArrived); MessageManager.GetInstance().Regist((int)GameMessageDefine.BroadcastAfterExtendSceneAndModifiedPath, this.OnBroadcastAfterExtendSceneAndModifiedPath); MessageManager.GetInstance().Regist((int)GameMessageDefine.BroadcastForwardOneStepInExitGateQueue, this.OnBroadcastForwardOneStepInExitGateQueue); MessageManager.GetInstance().Regist((int)GameMessageDefine.SendExitGateCheckinCDFinishReply, this.OnSendExitGateCheckinCDFinishReply); finishQueueStep = 0; GoToOrgPosOfQueue(entity); if (checkInCD == null) { checkInCD = new IntCD(0); } checkInCD.Stop(); LogWarp.LogFormat("{0} GoToOrgPosOfQueue step = {1}", entity.entityID, finishQueueStep); DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} GoToOrgPosOfQueue step = {1}", entity.entityID, finishQueueStep); }
public override void Release() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.GetUnlockAnimals, this.OnGetUnlockAnimals); unLockAnimals.Clear(); Stop(); }
public override void Leave() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.LittleZooDataReply, OnLittleZooDataReply); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.VisitorVisitCDFinshedReply, OnVisitorVisitCDFinshedReply); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.ImmediateFinishVisitCD, OnImmediateFinishVisitCD); base.Leave(); }
public override void Release() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SpawnVisitorFromCar, this.OnSpawnVisitorFromCar); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SpawnVisitorFromShip, this.OnSpawnVisitorFromShip); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SpawnShuttle, this.OnSpawnShuttle); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.SpawnVisitorFromGroundParking, this.OnSpawnVisitorFromGroundParking); isRandomSpawn = true; this.Stop(); }
public override void Init() { //注册消息 MessageManager.GetInstance().Regist((int)GameMessageDefine.GetUnlockAnimals, this.OnGetUnlockAnimals); unLockAnimals = new List <Animal>(); //Run(); }
public override void Leave() { MessageManager.GetInstance().UnRegist((int)UFrameBuildinMessage.Arrived, this.OnArrived); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.BroadcastAfterExtendSceneAndModifiedPath, this.OnBroadcastAfterExtendSceneAndModifiedPath); base.Leave(); }
void SendLogin() { //Debug.LogError("SendLogin"); MessageDefine.GameMsg_C2S_Login msgLogin = new MessageDefine.GameMsg_C2S_Login(); msgLogin.userName = "******"; msgLogin.password = "******"; MessageManager.GetInstance().gameMessageCenter.Send(msgLogin); }
public override void Release() { MessageManager.GetInstance().UnRegist((int)GameMessageDefine.GetItem, OnGetItem); MessageManager.GetInstance().UnRegist((int)GameMessageDefine.UseItem, OnUseItem); getItemCallbacks.Clear(); useItemCallbacks.Clear(); Stop(); }
//public override void Awake() //{ // Debug.LogError(Time.realtimeSinceStartup + " Awake"); // base.Awake(); // this.cacheTrans = FingerCamera.GetInstance().cacheTrans; // dragMoveTo = cacheTrans.position; // this.cacheCam = FingerCamera.GetInstance().cacheCam; // this.crossPoint = GameObject.Find("camer_range/cross_point").transform; // this.tryPoint = GameObject.Find("camer_range/try_point").transform; // this.moveToPoint = GameObject.Find("camer_range/moveto_point").transform; //} //public override void OnDestroy() //{ // Debug.LogError(Time.realtimeSinceStartup + " OnDestroy"); // this.cacheTrans = null; // this.cacheCam = null; // base.OnDestroy(); //} public override void Init() { if (LoadingMgr.Inst.runTimeLoaderType == RunTimeLoaderType.Editor) { base.SetRange(); } MessageManager.GetInstance().Regist((int)GameMessageDefine.LoadZooSceneFinished, OnLoadZooSceneFinished); MessageManager.GetInstance().Regist((int)GameMessageDefine.BroadcastOpenNewLittleZoo, OnBroadcastOpenNewLittleZoo); }
private void RegistMessages() { MessageManager.GetInstance().Regist((int)GameMessageDefine.BuildingLevelup, OnBuildingLevelup); MessageManager.GetInstance().Regist((int)GameMessageDefine.BroadcastOpenNewLittleZoo, OnBroadcastOpenNewLittleZoo); MessageManager.GetInstance().Regist((int)GameMessageDefine.VisitorReceiveComplete, OnVisitorReceiveComplete); MessageManager.GetInstance().Regist((int)GameMessageDefine.AdWatchComplete, OnAdWatchComplete); MessageManager.GetInstance().Regist((int)GameMessageDefine.GuideTaskActionButtonClick, OnTaskActionButtonClick); MessageManager.GetInstance().Regist((int)GameMessageDefine.BuildingUnlock, OnBuildingUnlock); GlobalEventHandler.inst.onApplicationPauseOnResume += OnApplicationPauseOnResume; }