protected void RunCheckInCD() { int cdVal = ExitGateModule.GetChinkinCDValMs(); var playerData = GlobalDataManager.GetInstance().playerData; if (playerData.playerZoo.buffExitEntryCDVal != UFrame.Const.Invalid_Float) { int buffExitEntryCDValMS = Math_F.FloatToInt1000(playerData.playerZoo.buffExitEntryCDVal); cdVal = Mathf.Min(cdVal, buffExitEntryCDValMS); } checkInCD.ResetOrg(cdVal); checkInCD.Run(); #if UNITY_EDITOR var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; LogWarp.LogFormat("{0} RunCheckInCD cdVal={1}", entity.entityID, cdVal); DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} RunCheckInCD cdVal={1}", entity.entityID, cdVal); #endif }
protected void TickShuttleVisistorNum(int deltaTimeMS) { this.shuttleaccumulativeTime += deltaTimeMS; if (shuttleVisitorQueue.Count >= ExitGateModule.GetMaxShuttleVisitor() && shuttleaccumulativeTime >= maxShuttleInterval) { shuttleVisitorList.Clear(); for (int i = 0; i < ExitGateModule.GetMaxShuttleVisitor(); i++) { var entity = shuttleVisitorQueue.Dequeue(); EntityManager.GetInstance().RemoveFromEntityMovables(entity); var shuttleVisitor = new ShuttleVisitor(); shuttleVisitor.Init(entity.entityID, (EntityFuncType)entity.entityFuncType); shuttleVisitorList.Add(shuttleVisitor); } //MessageManager.GetInstance().Send((int)GameMessageDefine.SpawnShuttle); SpawnShuttle.Send(shuttleVisitorList); shuttleaccumulativeTime -= maxShuttleInterval; #if DEBUG_VISIT BroadcastNum.Send((int)GameMessageDefine.BroadcastShuttleVisistorNum, shuttleVisitorQueue.Count, 0f, 0); #endif } }
protected void TickSpawnVisitor(int deltaTimeMS) { var entity = (this.fsmCtr as FSMMachineShuttle).ownerEntity; getOffAccumulativeTime += deltaTimeMS; if (getOffAccumulativeTime >= shuttleVisitorGetOffInterval && lastVisitorIdx < ExitGateModule.GetMaxShuttleVisitor() && isGetOff && lastVisitorIdx < entity.shuttleVisitorList.Count) { SpawnVisitorFromCar.Send(VisitorStage.GotoParking, entity.shuttleVisitorList[lastVisitorIdx].entityFuncType); if (lastVisitorIdx == ExitGateModule.GetMaxShuttleVisitor() - 1) { isGetOff = false; lastVisitorIdx = 0; isToStateShuttleGobackCalcPath = true; } else { lastVisitorIdx++; } getOffAccumulativeTime -= shuttleVisitorGetOffInterval; } }