Skip to content

Class "EntityNPC"⚓︎

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 EntitySlot
    class EntityTear
    Entity <|-- EntityBomb
    Entity <|-- EntityEffect
    Entity <|-- EntityFamiliar
    Entity <|-- EntityKnife
    Entity <|-- EntityLaser
    Entity <|-- EntityNPC
    Entity <|-- EntityPickup
    Entity <|-- EntityPlayer
    Entity <|-- EntityProjectile
    Entity <|-- EntitySlot
    Entity <|-- EntityTear
    link Entity "https://wofsauge.github.io/IsaacDocs/rep/Entity.html" "Go to page for 'Entity' class"
    link EntityBomb "https://wofsauge.github.io/IsaacDocs/rep/EntityBomb.html" "Go to page for 'EntityBomb' class"
    link EntityEffect "https://wofsauge.github.io/IsaacDocs/rep/EntityEffect.html" "Go to page for 'EntityEffect' class"
    link EntityFamiliar "https://wofsauge.github.io/IsaacDocs/rep/EntityFamiliar.html" "Go to page for 'EntityFamiliar' class"
    link EntityKnife "https://wofsauge.github.io/IsaacDocs/rep/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 "https://wofsauge.github.io/IsaacDocs/rep/EntityProjectile.html" "Go to page for 'EntityProjectile' class"
    link EntitySlot "EntitySlot.html" "Go to page for 'EntitySlot' class"
    link EntityTear "https://wofsauge.github.io/IsaacDocs/rep/EntityTear.html" "Go to page for 'EntityTear' class"

Modified Functions⚓︎

PlaySound ()⚓︎

void PlaySound ( int ID, float Volume = 1.0, int FrameDelay = 2, boolean Loop = true, float Pitch = 1.0 )⚓︎

ID 之外的所有参数现在都是可选的。


ClearFlyingOverride ()⚓︎

void ClearFlyingOverride ( )⚓︎

移除由 SetFlyingOverride 设置的任何值。


FireBossProjectilesEx ()⚓︎

EntityProjectile[] FireBossProjectilesEx ( int NumProjectiles, Vector TargetPos, float TrajectoryModifier, ProjectileParams Params )⚓︎

FireBossProjectiles 相同,但返回一个包含已生成弹幕列表的表。


FireGridEntity ()⚓︎

EntityProjectile FireGridEntity ( Sprite GridEntitySprite, GridEntityDesc GridEntityDesc, Vector Velocity, BackdropType Backdrop = BackdropType.BASEMENT )⚓︎


FireProjectilesEx ()⚓︎

EntityProjectile[] FireProjectilesEx (Vector Position, Vector Velocity, ProjectilesMode Mode, ProjectileParams Params)⚓︎

FireProjectiles 相同,但返回一个包含已生成弹幕列表的表。


GetBossColorIdx ()⚓︎

int GetBossColorIdx ( )⚓︎

返回 bosscoloridx(通常就是子类型),如果不是 bosscolor(或者不适用 bosscolor)则返回 -1。


GetControllerId ()⚓︎

int GetControllerId ( )⚓︎

返回 NPC 的控制器 ID,该 ID 指示哪个玩家正在控制它。当没有被任何玩家控制时将返回 -1


GetDarkRedChampionRegenTimer ()⚓︎

int GetDarkRedChampionRegenTimer ( )⚓︎


GetDirtColor ()⚓︎

Color GetDirtColor ( )⚓︎

返回实体的动态泥土颜色。这可以让像夜行者这样的实体融入环境。


GetFireplaceLoot ()⚓︎

LootList GetFireplaceLoot ( )⚓︎

返回壁炉使用的唯一 LootList


GetHitList ()⚓︎

int[] GetHitList ( )⚓︎


GetShieldStrength ()⚓︎

float GetShieldStrength ( )⚓︎


GetShopkeeperLoot ()⚓︎

LootList GetShopkeeperLoot ( )⚓︎

返回店主使用的唯一 LootList


GetSirenPlayerEntity ()⚓︎

EntityPlayer GetSirenPlayerEntity ( )⚓︎


IsBossColor ()⚓︎

boolean IsBossColor ( )⚓︎


ReplaceSpritesheet ()⚓︎

void ReplaceSpritesheet ( int LayerId, string PngFilename, bool LoadGraphics = false )⚓︎

类似于 Sprite.ReplaceSpritesheet()。如果可能的话,会在 PngFilename 后面追加 "_champion"/阶段后缀。


SetControllerId ()⚓︎

int SetControllerId ( int ControllerId )⚓︎

设置 NPC 的控制器 ID,该 ID 指示哪个玩家将控制它。将其设置为 -1 表示没有玩家控制(恢复正常行为)。


SetFlyingOverride ()⚓︎

void SetFlyingOverride ( boolean CanFly )⚓︎

设置对 IsFlying 返回值的覆盖,IsFlying 通常基于 EntityGridCollisionClass。可用于使地面敌人忽略水迹,或使飞行敌人被水迹击中。


SetShieldStrength ()⚓︎

void SetShieldStrength ( float Strength )⚓︎


ShootMaggotProjectile ()⚓︎

static const EntityNPC ShootMaggotProjectile ( Vector Position, Vector Target, float FallingSpeed = -8.0, float YOffset = -24.0 )⚓︎


SpawnBloodCloud ()⚓︎

EntityEffect SpawnBloodCloud ( Vector Position, Color Color )⚓︎


SpawnBloodSplash ()⚓︎

void SpawnBloodSplash ( )⚓︎


ThrowLeech ()⚓︎

static const EntityNPC ThrowLeech ( Vector Position, Entity Source, Vector Target, float YPosOffset = -10.0, boolean Big = false )⚓︎


ThrowMaggot ()⚓︎

static const EntityNPC ThrowMaggot ( Vector Origin, Vector Velocity, float YOffset = -10.0, float FallSpeed = -8.0 )⚓︎


ThrowMaggotAtPos ()⚓︎

static const EntityNPC ThrowMaggotAtPos ( Vector Origin, Vector Target, float YOffset = -8.0 )⚓︎


ThrowRockSpider ()⚓︎

static const EntityNPC ThrowRockSpider ( Vector Position, Entity Source, Vector Velocity, int Variant = 0, float YPosOffset = -10.0 )⚓︎


ThrowStrider ()⚓︎

static const EntityNPC ThrowStrider ( Vector Position, Entity Source, Vector Target )⚓︎


TryForceTarget ()⚓︎

boolean TryForceTarget ( Entity Target, int Duration )⚓︎

由迷失苍蝇使用,用于强制该 NPC 专注于特定目标。


TrySplit ()⚓︎

boolean TrySplit ( float DefaultDamage, EntityRef Source, boolean DoScreenEffects = true )⚓︎

将尝试像肉斧道具那样将敌人分裂成两个。如果敌人在分裂前因伤害死亡则返回 false,否则返回 true


TryThrow ()⚓︎

boolean TryThrow ( EntityRef Source, Vector Direction, float Force )⚓︎

Info

Force 仅适用于 NPC 便便(它会被修改,然后用作 V1.y,V1.x 为 -20.0),可能不准确。这需要进一步研究。


UpdateDirtColor ()⚓︎

void UpdateDirtColor ( boolean Immediate )⚓︎

指示实体更新其泥土颜色。在原版实体中,这通常是自动完成的,但到目前为止,模组实体在这方面一直相当受限。 如果设置了 Immediate,泥土颜色将被设置为实体下方的确切颜色。否则,它将在多帧的过程中平滑更新。


V1⚓︎

Vector V1⚓︎

修复后的原函数现在能正确返回一个指向向量(Vector)的指针。


V2⚓︎

Vector V2⚓︎

修复后的原函数现在能正确返回一个指向向量(Vector)的指针。