Skip to content

Class "Entity"⚓︎

Info

首先,请看 实体介绍.

可通过以下函数获取 “Entity” 对象:

???- info 能获取 “Entity” 对象的列表 * EntityList.Get() * Entity.GetLastChild() * Entity.GetLastParent() * Entity.Child * Entity.Parent * Entity.SpawnerEntity * Entity.Target * EntityLaser.BounceLaser() * EntityNPC.GetPlayerTarget() * EntityNPC.EntityRef * EntityPlayer.AddBlueFlies * EntityPlayer.AddBlueSpider * EntityPlayer.GetActiveWeaponEntity * EntityPlayer.GetNPCTarget * EntityPlayer.GetTractorBeam * EntityPlayer.ThrowBlueSpider * EntityPlayer.ThrowHeldEntity * EntityPtr * EntityRef.Entity * EntityTear.StickTarget * Game.Spawn() * Isaac.Spawn()

示例代码

local entity = Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, 0, Vector(320,280), Vector(0,0), nil)

Class Diagram⚓︎

    classDiagram
    class Entity:::diagramCurrentPage
    class EntityBomb
    class EntityEffect
    class EntityFamiliar
    class EntityKnife
    class EntityLaser
    class EntityNPC
    class EntityPickup
    class EntityPlayer
    class EntityProjectile
    class EntityTear
    Entity <|-- EntityBomb
    Entity <|-- EntityEffect
    Entity <|-- EntityFamiliar
    Entity <|-- EntityKnife
    Entity <|-- EntityLaser
    Entity <|-- EntityNPC
    Entity <|-- EntityPickup
    Entity <|-- EntityPlayer
    Entity <|-- EntityProjectile
    Entity <|-- EntityTear
    link Entity "Entity.html" "Go to page for 'Entity' class"
    link EntityBomb "EntityBomb.html" "Go to page for 'EntityBomb' class"
    link EntityEffect "EntityEffect.html" "Go to page for 'EntityEffect' class"
    link EntityFamiliar "EntityFamiliar.html" "Go to page for 'EntityFamiliar' class"
    link EntityKnife "EntityKnife.html" "Go to page for 'EntityKnife' class"
    link EntityLaser "EntityLaser.html" "Go to page for 'EntityLaser' class"
    link EntityNPC "EntityNPC.html" "Go to page for 'EntityNPC' class"
    link EntityPickup "EntityPickup.html" "Go to page for 'EntityPickup' class"
    link EntityPlayer "EntityPlayer.html" "Go to page for 'EntityPlayer' class"
    link EntityProjectile "EntityProjectile.html" "Go to page for 'EntityProjectile' class"
    link EntityTear "EntityTear.html" "Go to page for 'EntityTear' class"

Functions⚓︎

Add·Burn ()⚓︎

void AddBurn ( EntityRef Source, int Duration, float Damage )⚓︎

void AddBurn ( EntityRef Source, int Duration, float Damage, boolean IgnoreBosses )⚓︎

为实体添加燃烧效果. Duration 是持续帧数(时间). Damage 为每帧造成的伤害.

持续时间说明

Duration 至少需要 3 帧才能造成伤害。每次连续的伤害间隔为 20 帧.

  • 2 次伤害 = 23 帧
  • 3 次伤害 = 43 帧
  • 4 次伤害 = 63 帧

持续时间存在上限:对于玩家实体(EntityPlayer),最大值为 1 个间隔;对于普通实体,最大值为 6 个间隔.

Example Code

This code damages every entity in the room for 1 second with the damage source set to the player. The total damage dealt is 1.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddBurn(EntityRef(player), 30, 1)
end

Add·Charmed ()⚓︎

void AddCharmed ( EntityRef sourceEntity, int Duration )⚓︎

void AddCharmed ( EntityRef sourceEntity, int Duration, boolean IgnoreBosses )⚓︎

为敌人添加魅惑效果。持续时间以帧数为单位。被魅惑的敌人会对玩家友好,并攻击其他敌人.

Duration = -1 效果将永久存在,且敌人会跟随玩家进入不同房间.

Example Code

This code charms every entity in the room for 1 second.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs() do
    entity:AddCharmed(EntityRef(player), 30)
end

Add·Confusion ()⚓︎

void AddConfusion ( EntityRef Source, int Duration, boolean IgnoreBosses )⚓︎

为实体添加混乱效果.

持续时间说明

最大持续时间为 5 秒

Example Code

This code confuses every entity in the room for 1 second while ignoring bosses.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddConfusion(EntityRef(player), 30, true)
end

Add·Entity·Flags ()⚓︎

void AddEntityFlags ( int Flags )⚓︎

为实体添加实体标记标记用于添加特定效果,如友好状态或对尖刺伤害免疫等。可通过按位拼接同时添加多个标记.

Example Code

This code adds slowing and confusion to the entity.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddEntityFlags(EntityFlag.FLAG_SLOW | EntityFlag.FLAG_CONFUSION)
end

Add·Fear ()⚓︎

void AddFear ( EntityRef Source, int Duration )⚓︎

void AddFear ( EntityRef Source, int Duration, boolean IgnoreBosses )⚓︎

为实体添加恐惧效果.

持续时间说明

最大持续时间为 5 秒

Example Code

This code frightens every entity in the room for 1 second.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddFear(EntityRef(player), 30)
end

Add·Freeze ()⚓︎

void AddFreeze ( EntityRef Source, int Duration )⚓︎

void AddFreeze ( EntityRef Source, int Duration, boolean IgnoreBosses )⚓︎

Freezes an entity, making it unable to move and attack.

持续时间说明

最大持续时间为 5 秒

Example Code

This code freezes every entity in the room for 1 second.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddFreeze(EntityRef(player), 30)
end

Add·Health ()⚓︎

void AddHealth ( float HitPoints )⚓︎

为实体恢复生命值.


Add·Midas·Freeze ()⚓︎

void AddMidasFreeze ( EntityRef Source, int Duration )⚓︎

void AddMidasFreeze ( EntityRef Source, int Duration, boolean IgnoreBosses )⚓︎

将实体变为黄金雕像(无法移动、无法攻击,被击杀时掉落硬币)

持续时间说明

最大持续时间为 5 秒

Bug

应用到实体上的金色会在传入函数的整个持续时间内保留,即使冻结效果最多只持续 5 秒.

Example Code

This code turns every entity in the room into gold for 1 second.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddMidasFreeze(EntityRef(player), 30)
end

Add·Poison ()⚓︎

void AddPoison ( EntityRef Source, int Duration, float Damage )⚓︎

void AddPoison ( EntityRef Source, int Duration, float Damage, boolean IgnoreBosses )⚓︎

为实体添加中毒效果.

持续时间说明

持续时间至少需要 3 帧才能造成伤害。每次连续的伤害间隔为 20 帧.

1
2
3
4
- 2 次伤害 = 23 帧
- 3 次伤害 = 43 帧
- 4 次伤害 = 63 帧
...
Bug

持续时间存在上限。对于玩家实体(EntityPlayer),仅持续 1 个伤害间隔;对于普通实体,最多持续 6 个伤害间隔.

Example Code

This code applies a poison effect to every entity in the room for 1 second.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddPoison(EntityRef(player), 30, 1)
end

Add·Shrink ()⚓︎

void AddShrink ( EntityRef Source, int Duration )⚓︎

void AddShrink ( EntityRef Source, int Duration, boolean IgnoreBosses )⚓︎

为实体添加缩小效果.

持续时间说明

最大持续时间为 5 秒

Example Code

This code shrinks every entity in the room for 1 second.

1
2
3
4
5
local player = Isaac.GetPlayer()
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddShrink(EntityRef(player), 30)
end

Add·Slowing ()⚓︎

void AddSlowing ( EntityRef Source, int Duration, float SlowValue, Color SlowColor )⚓︎

void AddSlowing ( EntityRef Source, int Duration, float SlowValue, Color SlowColor, boolean IgnoreBosses )⚓︎

提高实体的摩擦力,从而有效减缓实体速度.

Example Code

This code slows every entity in the room for 1 second with 0.5 original speed and applies a red color to it.

1
2
3
4
5
6
local player = Isaac.GetPlayer()
local slowColor = Color(1, 0, 0, 1, 0, 0, 0)
local entities = Isaac.GetRoomEntities()
for i, entity in ipairs(entities) do
    entity:AddSlowing(EntityRef(player), 30, 0.5, slowColor)
end

Add·Velocity ()⚓︎

void AddVelocity ( Vector Velocity )⚓︎

为实体添加速度。可用于使实体向特定方向移动(例如碰撞后的结果)


Blood·Explode ()⚓︎

void BloodExplode ( )⚓︎

使实体伴随碎块和血液爆炸.


Can·Shut·Doors ()⚓︎

boolean CanShutDoors ( )⚓︎

判断敌人是否会保持门关闭状态。返回布尔值


Clear·Entity·Flags ()⚓︎

void ClearEntityFlags ( int Flags )⚓︎

从实体中移除所有指定的实体标记.


Collides·With·Grid ()⚓︎

boolean CollidesWithGrid ( )⚓︎

若实体当前正与有效的网格实体(根据其Entity.GridCollisionClass属性)发生碰撞,则返回 true.


Die ()⚓︎

void Die ( )⚓︎

杀死实体并触发其死亡动画.


Exists ()⚓︎

boolean Exists ( )⚓︎

检查实体是否仍在当前房间中生成.

主要用于解包 EntityPtr 时,对应的实体可能已在期间被杀死的情况.


Get·Boss·ID ()⚓︎

int GetBossID ( )⚓︎

若实体是 Boss,返回其特定的 Boss ID;若不是 Boss,返回 0.

Boss ID 与实体类型(Type)不同,它在 entities2.xml 文件的 “bossID” 属性中单独定义。 对于精神错乱(Delirium),此函数返回其当前变形后的 Boss ID.


Get·Color ()⚓︎

const Color GetColor ( )⚓︎

返回与该实体关联的颜色对象(Color).


Get·Data ()⚓︎

table GetData ( )⚓︎

返回一个包含与实体关联的模组相关数据的 Lua 表。初始时该表为空,模组存储在表中的任何值将保留到实体消失.

GetData is typically used by smaller mods as a quick way to store information about an entity without having to create a dedicated data structure.

Example Code

This code adds custom data to an entity or prints it in the console if it exists.

1
2
3
4
5
6
7
8
9
function checkAndSetData(entity)
  local data = entity:GetData()
  if data.foo == nil then -- Keys of data should be strings
    data.foo = "bar" -- Values of data can be any data type
    print("Assigned an initial key of: foo --> bar")
  else
    print("Key foo already exists: " .. tostring(data.foo))
  end
end

注意事项GetData:

  1. 数据并非每个模组独有,类似于全局变量,可能被其他模组覆盖,且不利于代码调试.

  2. 大多数实体离开房间时会消失,其数据也会被删除(玩家、随从和带有EntityFlag.FLAG_PERSISTENT标记的实体除外).

  3. 即使实体离开房间不消失,退出菜单或重启 / 结束 run 时,GetData 中的数据也会被删除,不适合存储需要持久化的状态.

MOD开发者应该考虑使用他们自己MOD的本地数据结构,以避免冲突和之前提出的任何其他问题。此类数据结构的索引通常是指针哈希,借助 GetPtrHash 函数,可获取任意实体对应的指针哈希.


Get·Drop·RNG ()⚓︎

RNG GetDropRNG ( )⚓︎

返回实体的指定随机数生成器(RNG)对象,用于确定实体死亡时掉落的物品.


Get·Entity·Flags ()⚓︎

int GetEntityFlags ( )⚓︎

获取实体的实体标记返回值为一个用作位掩码的数字.

Example Code

This code prints something in the console, if the entity has a specific EntityFlags.

1
2
3
if entity:GetEntityFlags() & EntityFlag.FLAG_CONFUSION == EntityFlag.FLAG_CONFUSION then
    print("This entity is confused!")
end

Get·Last·Child ()⚓︎

Entity GetLastChild ( )⚓︎

返回该实体的最后一个子实体。对于某些分段敌人,可用于直接获取最底部的 “尾部” 实体.

返回行为

若未找到子实体,返回 nil.


Get·Last·Parent ()⚓︎

Entity GetLastParent ( )⚓︎

返回该实体的最后一个父实体。对于某些分段敌人,可用于直接获取最顶部的 “头部” 实体.

返回行为

若未找到父实体,返回nil.


Get·Sprite ()⚓︎

Sprite GetSprite ( )⚓︎

返回实体的精灵对象(Sprite).


Has·Common·Parent·With·Entity ()⚓︎

boolean HasCommonParentWithEntity ( Entity Other )⚓︎

判断该实体与另一个实体是否有共同的父实体,返回布尔值


Has·Entity·Flags ()⚓︎

boolean HasEntityFlags ( int Flags )⚓︎

若实体具有所有指定的实体标记,返回 true.

Example Code

This code prints something in the console, if the entity has a specific EntityFlags.

1
2
3
if entity:HasEntityFlags(EntityFlag.FLAG_CONFUSION) then
    print("This entity is confused!")
end

Has·Full·Health ()⚓︎

boolean HasFullHealth ( )⚓︎

判断实体是否处于满血状态,返回布尔值


Has·Mortal·Damage ()⚓︎

boolean HasMortalDamage ( )⚓︎

判断实体是否受到了致命伤害,返回布尔值

说明

游戏会将受到的伤害添加到伤害缓冲区,并在下一帧应用。若缓冲伤害足以杀死实体,此函数返回 true。调用 TakeDamage () 后,该函数会额外更新.


Is·Active·Enemy ()⚓︎

boolean IsActiveEnemy ( boolean includeDead )⚓︎

如果实体是非背景 NPC(例如,除了火焰和店主之外的所有敌人),则返回 true


Is·Boss ()⚓︎

boolean IsBoss ( )⚓︎

如果实体是首领(显示生命值条),则返回 true


Is·Dead ()⚓︎

boolean IsDead ( )⚓︎

检查实体是否已死亡


Is·Enemy ()⚓︎

boolean IsEnemy ( )⚓︎

如果实体是不受玩家控制的 NPC,则返回 true


Is·Flying ()⚓︎

boolean IsFlying ( )⚓︎


Is·Frame ()⚓︎

boolean IsFrame ( int Frame, int Offset )⚓︎

每 X 帧返回 true


Is·Invincible ()⚓︎

boolean IsInvincible ( )⚓︎

检查实体是否无敌


Is·Visible ()⚓︎

boolean IsVisible ( )⚓︎

检查实体是否可见


Is·Vulnerable·Enemy ()⚓︎

boolean IsVulnerableEnemy ( )⚓︎

如果实体是可以被伤害的敌人,则返回 true


Kill ()⚓︎

void Kill ( )⚓︎

杀死实体并产生血溅或碎块效果.


Kill·With·Source ()⚓︎

void KillWithSource ( EntityRef Source )⚓︎


Multiply·Friction ()⚓︎

void MultiplyFriction ( float Value )⚓︎

将实体的摩擦力乘以指定的值


Post·Render ()⚓︎

void PostRender ( )⚓︎

将实体的摩擦力乘以指定的值


Remove ()⚓︎

void Remove ( )⚓︎

Remove the entity from the game instantly, without doing any additional effects/animations.


Remove·Status·Effects ()⚓︎

void RemoveStatusEffects ( )⚓︎

立即从游戏中移除实体,不执行任何额外的效果或动画.


Render ()⚓︎

void Render ( Vector Offset )⚓︎

在当前实体位置加上偏移量的位置渲染实体的当前精灵.


Render·Shadow·Layer ()⚓︎

boolean RenderShadowLayer ( Vector Offset )⚓︎

再次渲染阴影 / 阴影层.


Set·Color ()⚓︎

void SetColor ( Color Color, int Duration, int Priority, boolean Fadeout, boolean Share )⚓︎

为实体设置颜色掩码。这可用于将精灵染成不同的颜色.

Share 布尔值将颜色应用于子实体.

Example Code

This code changes the color of the sprite to a fully white sprite for 15 frames.

1
entity:SetColor(Color(1, 1, 1, 1, 255, 255, 255), 15, 1, false, false)

Set·Size ()⚓︎

void SetSize ( float Size, Vector SizeMulti, int NumGridCollisionPoints )⚓︎

设置实体的大小(碰撞大小).


Set·Sprite·Frame ()⚓︎

void SetSpriteFrame ( string AnimationName, int FrameNum )⚓︎

设置实体精灵的指定动画的帧


Set·Sprite·Overlay·Frame ()⚓︎

void SetSpriteOverlayFrame ( string AnimationName, int FrameNum )⚓︎

设置实体精灵覆盖层的指定动画的帧号


Take·Damage ()⚓︎

boolean TakeDamage ( float Damage, DamageFlag Flags, EntityRef Source, int DamageCountdown )⚓︎

注意

游戏会将受到的伤害添加到伤害缓冲区中,该缓冲区会在下一帧应用。因此,调用 TakeDamage() 后,实体的生命值不会立即减少,而是在下一帧更新.


To·Bomb ()⚓︎

EntityBomb ToBomb ( )⚓︎

用于将Entity 对象转换为 EntityBomb 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·Effect ()⚓︎

EntityEffect ToEffect ( )⚓︎

用于将 Entity 对象转换为 EntityEffect 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·Familiar ()⚓︎

EntityFamiliar ToFamiliar ( )⚓︎

用于将 Entity 对象转换为 EntityFamiliar 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·Knife ()⚓︎

EntityKnife ToKnife ( )⚓︎

用于将 Entity 对象转换为 EntityKnife 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·Laser ()⚓︎

EntityLaser ToLaser ( )⚓︎

用于将 Entity 对象转换为 EntityLaser 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·NPC ()⚓︎

EntityNPC ToNPC ( )⚓︎

用于将 Entity 对象转换为 EntityNPC 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·Pickup ()⚓︎

EntityPickup ToPickup ( )⚓︎

用于将 Entity 对象转换为 EntityPickup 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·Player ()⚓︎

EntityPlayer ToPlayer ( )⚓︎

用于将 Entity 对象转换为 EntityPlayer 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·Projectile ()⚓︎

EntityProjectile ToProjectile ( )⚓︎

用于将 Entity 对象转换为 EntityProjectile 对象.

返回行为

如果转换不成功,此函数返回 nil.


To·Tear ()⚓︎

EntityTear ToTear ( )⚓︎

用于将 Entity 对象转换为 EntityTear object.

返回行为

如果转换不成功,此函数返回 nil.


Update ()⚓︎

void Update ( )⚓︎

为实体运行一帧的更新后逻辑,这将触发关联的回调。模组通常不需要调用此函数,因为在一帧内多次运行更新后逻辑可能会导致错误.


Variables⚓︎

Child⚓︎

Entity Child⚓︎

实体的子实体

Warning

“Sisters visi” Boss 的对应实体互为子实体,但它们都没有父实体(Parent.


Collision·Damage⚓︎

float CollisionDamage⚓︎

实体碰撞造成的伤害


Color⚓︎

Color Color⚓︎

实体的颜色


Depth·Offset⚓︎

float DepthOffset⚓︎

获取 / 设置实体的深度偏移量。该值会添加到实体的 Y 坐标中,用于确定每个实体的渲染顺序。所有实体的默认值为 0.

Example Code

This code explains how this variable works.

1
2
3
4
5
6
7
entity1.Position.Y -- => 50
entity2.Position.Y -- => 45
-- Entity1 is rendered in front of Entity2

entity1.DepthOffset = -10
-- new Entity1 renderYPosition => 40
-- Entity2 is rendered in front of Entity1

Drop·Seed⚓︎

const int DropSeed⚓︎

获取掉落随机数生成器(RNG)的种子


Entity·Collision·Class⚓︎

EntityCollisionClass EntityCollisionClass⚓︎

实体的碰撞类别


FlipX⚓︎

boolean FlipX⚓︎

实体是否沿 X 轴翻转


Frame·Count⚓︎

const int FrameCount⚓︎


Friction⚓︎

float Friction⚓︎

从实体配置中加载的摩擦力


Grid·Collision·Class⚓︎

EntityGridCollisionClass GridCollisionClass⚓︎

实体与网格的碰撞类别

注意

玩家实体(EntityPlayers)只能使用 GRIDCOLL_NONE、GRIDCOLL_WALLS 和 GRIDCOLL_GROUND,其他枚举值的行为与 GRIDCOLL_WALLS 相同.


Hit·Points⚓︎

float HitPoints⚓︎

实体的当前生命值

注意

实体受到伤害时,生命值不会立即减少,而是在下一帧更新.


Index⚓︎

const int Index⚓︎


Init·Seed⚓︎

const int InitSeed⚓︎

实体的初始种子


Mass⚓︎

float Mass⚓︎

实体的质量

注意

静止敌人的质量为 100(某些静止非敌人实体如老虎机除外).


Max·Hit·Points⚓︎

float MaxHitPoints⚓︎

实体的最大生命值


Parent⚓︎

Entity Parent⚓︎

实体的父实体。对于大多数实体,该字段为 nil。在多段实体中,该字段用于指向 “主” 实体(如头部).


Position⚓︎

Vector Position⚓︎


Position·Offset⚓︎

const Vector PositionOffset⚓︎

实体的位置


Render·ZOffset⚓︎

int RenderZOffset⚓︎

实体的位置偏移量

Bugs

该变量似乎没有任何有用的作用。请改用 DepthOffset.


Size⚓︎

float Size⚓︎

实体 hitbox(阴影/碰撞箱) 的大小.


Size·Multi⚓︎

Vector SizeMulti⚓︎

以撒中的“Hitbox”并不是盒状,而是胶囊形(或圆圈)。这决定了圆的形状,X值越大,圆越宽,Y值越高,圆越高,反之亦然。


Sorting·Layer⚓︎

SortingLayer SortingLayer⚓︎

Determines when the entity should render over other entities.


Spawner·Entity⚓︎

Entity SpawnerEntity⚓︎

生成该实体的实体


Spawner·Type⚓︎

EntityType SpawnerType⚓︎

生成该实体的实体类型


Spawner·Variant⚓︎

int SpawnerVariant⚓︎

生成该实体的实体变种


Spawn·Grid·Index⚓︎

const int SpawnGridIndex⚓︎

房间生成时实体生成所在的网格索引. 重新随机生成的物品基座或房间初始生成后再生成的实体,该值为 - 1


Splat·Color⚓︎

Color SplatColor⚓︎

实体死亡时碎块的颜色. 该属性的颜色为只读,若要更改,需用新的颜色对象(Color)替换.


Sprite·Offset⚓︎

Vector SpriteOffset⚓︎

精灵的偏移量


Sprite·Rotation⚓︎

float SpriteRotation⚓︎

精灵的旋转角度


Sprite·Scale⚓︎

Vector SpriteScale⚓︎

获取 / 设置敌人精灵的缩放比例,也可用于缩放实体的阴影。它还作为玩家属性,可在 MC_EVALUATE_CACHE 回调中使用 CacheFlag.CACHE_SIZE 标记更改,等同于大小(Size)属性

大多数 “变大” 效果的物品(如魔法蘑菇、“变大” 药丸等)通过将 SpriteScale 乘以 1.2500623464584(推测为 1.25,存在浮点误差,建议使用 1.25 以保证兼容性)来实现效果;大多数 “变小” 效果的物品(如迷你蘑菇、Binky、“变小” 药丸等)通过乘以 0.79996013641357(推测为 0.8)来实现;冥王星(Pluto)使用自己的乘数 0.5


Sub·Type⚓︎

int SubType⚓︎

实体的子类型


Target⚓︎

Entity Target⚓︎

实体的目标实体


Target·Position⚓︎

Vector TargetPosition⚓︎

实体的目标位置


Type⚓︎

const EntityType Type⚓︎

实体的类型


Variant⚓︎

int Variant⚓︎

实体的变种


Velocity⚓︎

Vector Velocity⚓︎

实体的速度


Visible⚓︎

boolean Visible⚓︎



Last update: July 17, 2025