Skip to content

Global Class "EntityConfig"⚓︎

Info

These functions can be accessed via the EntityConfig global table.

注意:调用这些函数时,必须使用 .(句点)而非 :(冒号)!

Example Code
1
local gaperConfig = EntityConfig.GetEntity(EntityType.ENTITY_GAPER)

Functions⚓︎

GetBaby ()⚓︎

EntityConfigBaby GetBaby ( BabySubType Type )⚓︎

如果不存在具有指定 ID 的合作宝宝,则返回 nil。


GetEntity ()⚓︎

EntityConfigEntity GetEntity ( EntityType Type, int Variant = -1, int SubType = -1 )⚓︎

如果不存在具有指定类型的实体,则返回 nil。 提供变体(Variant)和/或子类型(SubType)是可选的。如果请求了不存在的变体/子类型,则返回该实体的基础版本。


GetMaxBabyID ()⚓︎

int GetMaxBabyID ( )⚓︎

返回当前分配给有效合作宝宝的最高 ID(对应子类型)。


GetMaxPlayerType ()⚓︎

int GetMaxPlayerType ( )⚓︎

返回当前分配给有效角色的最高玩家类型(PlayerType)。


GetPlayer ()⚓︎

EntityConfigPlayer GetPlayer ( PlayerType PlayerType )⚓︎

如果不存在具有指定玩家类型的角色,则返回 nil。