102 lines
3.2 KiB
Lua
102 lines
3.2 KiB
Lua
|
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_StarrySky",
|
||
|
MiniMapInfo = {
|
||
|
MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Levels/MiniMap/MiniMap_TKFX.MiniMap_TKFX'),
|
||
|
MapCentre = {X=0.000000,Y=0.000000,Z=0.000000},
|
||
|
MapSize = 10000.0,
|
||
|
MapScale = 30.,
|
||
|
},
|
||
|
SpecialModeType = MapConfig.ESpecialModeType.Default,
|
||
|
ProbabilityOfPlaying = 10,
|
||
|
},
|
||
|
|
||
|
{
|
||
|
ShowName = "星空基地",
|
||
|
MapName = "Map_XKJD",
|
||
|
MiniMapInfo = {
|
||
|
MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Levels/MiniMap/MiniMap_XKJD.MiniMap_XKJD'),
|
||
|
MapCentre = {X=0.000000,Y=0.000000,Z=0.000000},
|
||
|
MapSize = 10000.0,
|
||
|
MapScale = 30.,
|
||
|
},
|
||
|
SpecialModeType = MapConfig.ESpecialModeType.Default,
|
||
|
ProbabilityOfPlaying = 10,
|
||
|
},
|
||
|
{
|
||
|
ShowName = "基地物资仓",
|
||
|
MapName = "Map_XKJD_2",
|
||
|
MiniMapInfo = {
|
||
|
MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Levels/MiniMap/MiniMap_JDWZC.MiniMap_JDWZC'),
|
||
|
MapCentre = {X=0.000000,Y=0.000000,Z=0.000000},
|
||
|
MapSize = 10000.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,
|
||
|
|
||
|
}
|