private void onInitBackground() { BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.SetShipDrawType(FleetType.Enemy, ShipDrawType.Normal); battleShips.SetStandingPosition(StandingPositionType.OneRow); battleShips.SetLayer(Generics.Layers.ShipGirl); BattleField battleField = BattleTaskManager.GetBattleField(); battleField.ResetFleetAnchorPosition(); BattleTaskManager.GetPrefabFile().DisposeProdCommandBuffer(); BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.SwitchMainCamera(FleetType.Friend); battleCameras.InitEnemyFieldCameraDefault(); BattleFieldCamera friendFieldCamera = battleCameras.friendFieldCamera; BattleFieldCamera enemyFieldCamera = battleCameras.enemyFieldCamera; battleCameras.isFieldDimCameraEnabled = false; friendFieldCamera.ResetMotionBlur(); friendFieldCamera.clearFlags = CameraClearFlags.Skybox; friendFieldCamera.cullingMask = battleCameras.GetDefaultLayers(); enemyFieldCamera.cullingMask = battleCameras.GetEnemyCamSplitLayers(); battleCameras.SetVerticalSplitCameras(isSplit: true); friendFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl); enemyFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl); Vector3 position = battleField.dicCameraAnchors[CameraAnchorType.OneRowAnchor][FleetType.Friend].position; friendFieldCamera.transform.position = new Vector3(-51f, 8f, 90f); friendFieldCamera.transform.localRotation = Quaternion.Euler(new Vector3(10.5f, 70f, 0f)); Vector3 position2 = battleField.dicCameraAnchors[CameraAnchorType.OneRowAnchor][FleetType.Enemy].position; enemyFieldCamera.transform.position = new Vector3(-51f, 8f, -90f); enemyFieldCamera.transform.rotation = Quaternion.Euler(new Vector3(10.5f, 111f, 0f)); battleField.isEnemySeaLevelActive = true; battleField.AlterWaveDirection(FleetType.Friend, FleetType.Friend); battleField.AlterWaveDirection(FleetType.Enemy, FleetType.Enemy); BattleShips battleShips2 = BattleTaskManager.GetBattleShips(); battleShips2.RadarDeployment(isDeploy: false); battleShips2.SetBollboardTarget(isFriend: false, enemyFieldCamera.transform); battleShips2.SetTorpedoSalvoWakeAngle(isSet: true); BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; UITexture component = ((Component)cutInEffectCamera.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>(); if (component != null) { component.alpha = 1f; } BattleTaskManager.GetBattleCameras().fieldDimCamera.maskAlpha = 0f; foreach (UIBattleShip value in BattleTaskManager.GetBattleShips().dicFriendBattleShips.Values) { value.billboard.billboardTarget = BattleTaskManager.GetBattleCameras().friendFieldCamera.transform; } foreach (UIBattleShip value2 in BattleTaskManager.GetBattleShips().dicEnemyBattleShips.Values) { value2.billboard.billboardTarget = BattleTaskManager.GetBattleCameras().enemyFieldCamera.transform; } }
private void onInitBackground() { BattleShips battleShips = BattleTaskManager.GetBattleShips(); battleShips.SetShipDrawType(FleetType.Enemy, ShipDrawType.Normal); battleShips.SetStandingPosition(StandingPositionType.OneRow); battleShips.SetLayer(Generics.Layers.ShipGirl); BattleField battleField = BattleTaskManager.GetBattleField(); battleField.ResetFleetAnchorPosition(); BattleTaskManager.GetPrefabFile().DisposeProdCommandBuffer(); BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); battleCameras.SwitchMainCamera(FleetType.Friend); battleCameras.InitEnemyFieldCameraDefault(); BattleFieldCamera friendFieldCamera = battleCameras.friendFieldCamera; BattleFieldCamera enemyFieldCamera = battleCameras.enemyFieldCamera; battleCameras.isFieldDimCameraEnabled = false; friendFieldCamera.ResetMotionBlur(); friendFieldCamera.clearFlags = 1; friendFieldCamera.cullingMask = battleCameras.GetDefaultLayers(); enemyFieldCamera.cullingMask = battleCameras.GetEnemyCamSplitLayers(); battleCameras.SetVerticalSplitCameras(true); friendFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl); enemyFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl); Vector3 position = battleField.dicCameraAnchors.get_Item(CameraAnchorType.OneRowAnchor).get_Item(FleetType.Friend).get_position(); friendFieldCamera.get_transform().set_position(new Vector3(-51f, 8f, 90f)); friendFieldCamera.get_transform().set_localRotation(Quaternion.Euler(new Vector3(10.5f, 70f, 0f))); Vector3 position2 = battleField.dicCameraAnchors.get_Item(CameraAnchorType.OneRowAnchor).get_Item(FleetType.Enemy).get_position(); enemyFieldCamera.get_transform().set_position(new Vector3(-51f, 8f, -90f)); enemyFieldCamera.get_transform().set_rotation(Quaternion.Euler(new Vector3(10.5f, 111f, 0f))); battleField.isEnemySeaLevelActive = true; battleField.AlterWaveDirection(FleetType.Friend, FleetType.Friend); battleField.AlterWaveDirection(FleetType.Enemy, FleetType.Enemy); BattleShips battleShips2 = BattleTaskManager.GetBattleShips(); battleShips2.RadarDeployment(false); battleShips2.SetBollboardTarget(false, enemyFieldCamera.get_transform()); battleShips2.SetTorpedoSalvoWakeAngle(true); BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; UITexture component = cutInEffectCamera.get_transform().FindChild("TorpedoLine/OverlayLine").GetComponent <UITexture>(); if (component != null) { component.alpha = 1f; } BattleTaskManager.GetBattleCameras().fieldDimCamera.maskAlpha = 0f; using (Dictionary <int, UIBattleShip> .ValueCollection.Enumerator enumerator = BattleTaskManager.GetBattleShips().dicFriendBattleShips.get_Values().GetEnumerator()) { while (enumerator.MoveNext()) { UIBattleShip current = enumerator.get_Current(); current.billboard.billboardTarget = BattleTaskManager.GetBattleCameras().friendFieldCamera.get_transform(); } } using (Dictionary <int, UIBattleShip> .ValueCollection.Enumerator enumerator2 = BattleTaskManager.GetBattleShips().dicEnemyBattleShips.get_Values().GetEnumerator()) { while (enumerator2.MoveNext()) { UIBattleShip current2 = enumerator2.get_Current(); current2.billboard.billboardTarget = BattleTaskManager.GetBattleCameras().enemyFieldCamera.get_transform(); } } }