MapConfig = MapConfig or {} MapConfig.DefaultMaps = { --"Map_Default" "Map_Default2" } MapConfig.ESpecialModeType = { Default = 1, --- 默认 LowGravity = 2, --- 低重力 HighMovementSpeed = 3, --- 高移速 Reduce = 4, --- 缩小 IndividualCompetition = 5, --- 个人竞技 } MapConfig.SpecialModeName = { [MapConfig.ESpecialModeType.Default] = "", [MapConfig.ESpecialModeType.LowGravity] = "低重力", [MapConfig.ESpecialModeType.HighMovementSpeed] = "加速场地", [MapConfig.ESpecialModeType.Reduce] = "缩小世界", [MapConfig.ESpecialModeType.IndividualCompetition] = "个人", } MapConfig.MapInfo = { { ShowName = "六边形训练场", MapName = "Map_XD", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Levels/MiniMap/MiniMap_LBXXLC.MiniMap_LBXXLC'), MapCentre = {X=-180.000000,Y=490.000000,Z=280.500183}, MapSize = 6000.0, MapScale = 30., }, SpecialModeType = MapConfig.ESpecialModeType.Default, ProbabilityOfPlaying = 15, }, { ShowName = "海岛训练场", MapName = "Map_ZFX", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Levels/MiniMap/MiniMap_ZFX.MiniMap_ZFX'), --MapPath = UGCGameSystem.GetUGCResourcesFullPath('EnergyHuntingGround.EnergyHuntingGround'), MapCentre = {X=-180.000000,Y=790.000000,Z=280.500183}, MapSize = 6000.0, MapScale = 30., }, SpecialModeType = MapConfig.ESpecialModeType.Default, ProbabilityOfPlaying = 10000, }, { ShowName = "海岛训练场II", MapName = "Map_HDXLC2", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Levels/MiniMap/MiniMap_HDXLC2.MiniMap_HDXLC2'), MapCentre = {X=-180.000000,Y=790.000000,Z=280.500183}, MapSize = 6000.0, MapScale = 30., }, SpecialModeType = MapConfig.ESpecialModeType.Default, ProbabilityOfPlaying = 10, }, } MapConfig.SpecialModeFunc = { [MapConfig.ESpecialModeType.LowGravity] = function(GravityScale) if GravityScale == nil then GravityScale = 0.3 end UGCEventSystem.AddListener(EventEnum.PlayerBeginPlay, function(PlayerPawn) PlayerPawn:SetGravityScale(GravityScale) end ) end, [MapConfig.ESpecialModeType.HighMovementSpeed] = function(SpeedScale) UGCEventSystem.AddListener(EventEnum.PlayerBeginPlay, function(PlayerPawn) UGCPawnAttrSystem.SetSpeedScale(PlayerPawn, SpeedScale) end ) end, [MapConfig.ESpecialModeType.Reduce] = function(ScaleValue) if ScaleValue == nil then ScaleValue = 0.5 end UGCEventSystem.AddListener(EventEnum.PlayerBeginPlay, function(PlayerPawn) UGCEventSystem.SetTimer(UGCGameSystem.GameState, function() if UE.IsValid(PlayerPawn) then PlayerPawn:ScalePlayer(ScaleValue) end end, 1.) end ) end, }