/// <summary> /// 其他场景的动物栏收益和 /// </summary> /// <param name="isNeedMulBuff"></param> /// <returns></returns> public static System.Numerics.BigInteger GetOtherSceneAllZooPrice(int sceneID, bool isNeedMulBuff = false) { int parkNumber = ParkingCenter.GetOtherSceneParkingEnterCarSpawn(sceneID); float entryGateNumber = EntryGateModule.GetAllEntryChargeValMs(sceneID); //LogWarp.LogErrorFormat("其他场景 停车场来人速度{0} 售票口收费速度{1}", parkNumber, entryGateNumber); System.Numerics.BigInteger littleZooNumber = 0; PlayerData playerData = GlobalDataManager.GetInstance().playerData; var littleZooModuleDataList_MS = GlobalDataManager.GetInstance().playerData.playerZoo.littleZooModuleDatasMSS; //int sceneID = GlobalDataManager.GetInstance().playerData.playerZoo.currSceneID; for (int i = 0; i < littleZooModuleDataList_MS.Count; i++) { if (littleZooModuleDataList_MS[i].littleZooTicketsLevel == 0 || littleZooModuleDataList_MS[i].sceneID != sceneID) { continue; } //每分钟动物栏基础收益=动物栏产出*min(停车场来人速度,售票口收费速度(全),60/(观光速度*观光点数)) //动物栏产出 var number1 = LittleZooModule.GetLittleZooPrice(littleZooModuleDataList_MS[i].littleZooID, littleZooModuleDataList_MS[i].littleZooTicketsLevel, isNeedMulBuff); //观光速度*观光点数 var number4 = LittleZooModule.GetLittleZooVisitorNumberMS(littleZooModuleDataList_MS[i].littleZooID, littleZooModuleDataList_MS[i]); var number5 = (int)(Mathf.Min(parkNumber, entryGateNumber, number4)) * number1; //LogWarp.LogErrorFormat("测试:非 parkNumber={0} entryGateNumber={1} number4={2} number1={3} ",parkNumber, entryGateNumber, number4,number1); littleZooNumber += number5; } return(littleZooNumber); }
/// <summary> /// 当前每分钟产出 /// 所有动物栏收益+售票口票价*min(停车场来人速度,售票口收费速度(全)) /// </summary> /// <returns></returns> public static System.Numerics.BigInteger CurrScenePerMinCoin(bool isNeedMulBuff = false) { //所有动物栏收益 var allZooPrice = GetAllZooPrice(isNeedMulBuff); //每分钟售票口基础收益=售票口票价*min(停车场来人速度,售票口收费速度(全)) //售票口票价: int sceneID = GlobalDataManager.GetInstance().playerData.playerZoo.currSceneID; var entryPrice = EntryGateModule.GetEntryPrice(GlobalDataManager.GetInstance().playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel, sceneID, isNeedMulBuff); //min(停车场来人速度,售票口收费速度(全)) var number = Mathf.Min(ParkingCenter.GetParkingEnterCarSpawn(), EntryGateModule.GetAllEntryChargeValMs()); //所有动物栏收益+售票口票价*min(停车场来人速度,售票口收费速度(全)) System.Numerics.BigInteger coin = allZooPrice + (entryPrice * (int)(number * 100)) / 100; //Logger.LogWarp.LogErrorFormat("测试:当前场景 每分钟 收益 allZooPrice={0}, entryPrice={1}, number={2}", allZooPrice ,entryPrice ,number ); return(coin); }
/// <summary> /// 其他场景产出每分钟产 /// 所有动物栏收益+售票口票价*min(停车场来人速度,售票口收费速度(全)) /// </summary> /// <returns></returns> public static System.Numerics.BigInteger LeaveScenePerMinCoin(int sceneID, bool isNeedMulBuff = false) { System.Numerics.BigInteger coin = 0; var playerData = GlobalDataManager.GetInstance().playerData; var scenePlayerData = playerData.playerZoo.scenePlayerDataMSS; if (scenePlayerData == null) { return(coin); } var sceneStates = scenePlayerData.sceneStates; if (sceneStates == null) { return(coin); } 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 && sceneState.sceneId == sceneID) { //所有动物栏收益 var allZooPrice = GetOtherSceneAllZooPrice(sceneID, isNeedMulBuff); //每分钟售票口基础收益=售票口票价*min(停车场来人速度,售票口收费速度(全)) //售票口票价: var entryPrice = EntryGateModule.GetEntryPrice(GlobalDataManager.GetInstance().playerData.GetEntryDateDataIDIndexOfDataIdx(sceneID).entryTicketsLevel, sceneID, isNeedMulBuff); //min(停车场来人速度,售票口收费速度(全)) var number = Mathf.Min(ParkingCenter.GetOtherSceneParkingEnterCarSpawn(sceneID), EntryGateModule.GetAllEntryChargeValMs(sceneID)); //所有动物栏收益+售票口票价*min(停车场来人速度,售票口收费速度(全)) coin = allZooPrice + (entryPrice * (int)(number * 100)) / 100; //Logger.LogWarp.LogErrorFormat("测试:其他场景{0} 每分钟 收益 allZooPrice={1}, entryPrice={2}, number={3}", sceneID, allZooPrice, entryPrice, number); } } return(coin); }