C# Класс Terraria.ModLoader.ModNPC

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
aiType int
animationType int
banner int
bannerItem int
bossBag int
drawOffsetY float
music int

Открытые методы

Метод Описание
AI ( ) : void
Autoload ( string &name, string &texture, string &altTextures ) : bool
AutoloadHead ( string &headTexture, string &bossHeadTexture ) : void
BossHeadRotation ( float &rotation ) : void
BossHeadSlot ( int &index ) : void
BossHeadSpriteEffects ( SpriteEffects &spriteEffects ) : void
BossLoot ( string &name, int &potionType ) : void
CanBeHitByItem ( Player player, Item item ) : bool?
CanBeHitByProjectile ( Projectile projectile ) : bool?
CanHitNPC ( Terraria.NPC target ) : bool?
CanHitPlayer ( Player target, int &cooldownSlot ) : bool
CanSpawn ( Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : float
CanTownNPCSpawn ( int numTownNPCs, int money ) : bool
CheckActive ( ) : bool
CheckConditions ( int left, int right, int top, int bottom ) : bool
CheckDead ( ) : bool
DrawEffects ( Color &drawColor ) : void
DrawHealthBar ( byte hbPosition, float &scale, Vector2 &position ) : bool?
DrawTownAttackGun ( float &scale, int &item, int &closeness ) : void
DrawTownAttackSwing ( Texture2D &item, int &itemSize, float &scale, Vector2 &offset ) : void
FindFrame ( int frameHeight ) : void
GetAlpha ( Color drawColor ) : Color?
GetChat ( ) : string
HitEffect ( int hitDirection, double damage ) : void
ModNPC ( ) : System
ModifyHitByItem ( Player player, Item item, int &damage, float &knockback, bool &crit ) : void
ModifyHitByProjectile ( Projectile projectile, int &damage, float &knockback, bool &crit ) : void
ModifyHitNPC ( Terraria.NPC target, int &damage, float &knockback, bool &crit ) : void
ModifyHitPlayer ( Player target, int &damage, bool &crit ) : void
NPCLoot ( ) : void
OnChatButtonClicked ( bool firstButton, bool &shop ) : void
OnHitByItem ( Player player, Item item, int damage, float knockback, bool crit ) : void
OnHitByProjectile ( Projectile projectile, int damage, float knockback, bool crit ) : void
OnHitNPC ( Terraria.NPC target, int damage, float knockback, bool crit ) : void
OnHitPlayer ( Player target, int damage, bool crit ) : void
PostAI ( ) : void
PostDraw ( SpriteBatch spriteBatch, Color drawColor ) : void
PreAI ( ) : bool
PreDraw ( SpriteBatch spriteBatch, Color drawColor ) : bool
PreNPCLoot ( ) : bool
ReceiveExtraAI ( BinaryReader reader ) : void
ResetEffects ( ) : void
ScaleExpertStats ( int numPlayers, float bossLifeScale ) : void
SendExtraAI ( BinaryWriter writer ) : void
SetChatButtons ( string &button, string &button2 ) : void
SetDefaults ( ) : void
SetupShop ( Chest shop, int &nextSlot ) : void
SpawnNPC ( int tileX, int tileY ) : int
StrikeNPC ( double &damage, int defense, float &knockback, int hitDirection, bool &crit ) : bool
TownNPCAttackCooldown ( int &cooldown, int &randExtraCooldown ) : void
TownNPCAttackMagic ( float &auraLightMultiplier ) : void
TownNPCAttackProj ( int &projType, int &attackDelay ) : void
TownNPCAttackProjSpeed ( float &multiplier, float &gravityCorrection, float &randomOffset ) : void
TownNPCAttackShoot ( bool &inBetweenShots ) : void
TownNPCAttackStrength ( int &damage, float &knockback ) : void
TownNPCAttackSwing ( int &itemWidth, int &itemHeight ) : void
TownNPCName ( ) : string
UpdateLifeRegen ( int &damage ) : void
UsesPartyHat ( ) : bool

Приватные методы

Метод Описание
SetupNPC ( Terraria.NPC npc ) : void

Описание методов

AI() публичный метод

public AI ( ) : void
Результат void

Autoload() публичный метод

public Autoload ( string &name, string &texture, string &altTextures ) : bool
name string
texture string
altTextures string
Результат bool

AutoloadHead() публичный метод

public AutoloadHead ( string &headTexture, string &bossHeadTexture ) : void
headTexture string
bossHeadTexture string
Результат void

BossHeadRotation() публичный метод

public BossHeadRotation ( float &rotation ) : void
rotation float
Результат void

BossHeadSlot() публичный метод

public BossHeadSlot ( int &index ) : void
index int
Результат void

BossHeadSpriteEffects() публичный метод

public BossHeadSpriteEffects ( SpriteEffects &spriteEffects ) : void
spriteEffects SpriteEffects
Результат void

BossLoot() публичный метод

public BossLoot ( string &name, int &potionType ) : void
name string
potionType int
Результат void

CanBeHitByItem() публичный метод

public CanBeHitByItem ( Player player, Item item ) : bool?
player Terraria.Player
item Item
Результат bool?

CanBeHitByProjectile() публичный метод

public CanBeHitByProjectile ( Projectile projectile ) : bool?
projectile Terraria.Projectile
Результат bool?

CanHitNPC() публичный метод

public CanHitNPC ( Terraria.NPC target ) : bool?
target Terraria.NPC
Результат bool?

CanHitPlayer() публичный метод

public CanHitPlayer ( Player target, int &cooldownSlot ) : bool
target Terraria.Player
cooldownSlot int
Результат bool

CanSpawn() публичный метод

public CanSpawn ( Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : float
spawnInfo Terraria.ModLoader.NPCSpawnInfo
Результат float

CanTownNPCSpawn() публичный метод

public CanTownNPCSpawn ( int numTownNPCs, int money ) : bool
numTownNPCs int
money int
Результат bool

CheckActive() публичный метод

public CheckActive ( ) : bool
Результат bool

CheckConditions() публичный метод

public CheckConditions ( int left, int right, int top, int bottom ) : bool
left int
right int
top int
bottom int
Результат bool

CheckDead() публичный метод

public CheckDead ( ) : bool
Результат bool

DrawEffects() публичный метод

public DrawEffects ( Color &drawColor ) : void
drawColor Color
Результат void

DrawHealthBar() публичный метод

public DrawHealthBar ( byte hbPosition, float &scale, Vector2 &position ) : bool?
hbPosition byte
scale float
position Vector2
Результат bool?

DrawTownAttackGun() публичный метод

public DrawTownAttackGun ( float &scale, int &item, int &closeness ) : void
scale float
item int
closeness int
Результат void

DrawTownAttackSwing() публичный метод

public DrawTownAttackSwing ( Texture2D &item, int &itemSize, float &scale, Vector2 &offset ) : void
item Texture2D
itemSize int
scale float
offset Vector2
Результат void

FindFrame() публичный метод

public FindFrame ( int frameHeight ) : void
frameHeight int
Результат void

GetAlpha() публичный метод

public GetAlpha ( Color drawColor ) : Color?
drawColor Color
Результат Color?

GetChat() публичный метод

public GetChat ( ) : string
Результат string

HitEffect() публичный метод

public HitEffect ( int hitDirection, double damage ) : void
hitDirection int
damage double
Результат void

ModNPC() публичный метод

public ModNPC ( ) : System
Результат System

ModifyHitByItem() публичный метод

public ModifyHitByItem ( Player player, Item item, int &damage, float &knockback, bool &crit ) : void
player Terraria.Player
item Item
damage int
knockback float
crit bool
Результат void

ModifyHitByProjectile() публичный метод

public ModifyHitByProjectile ( Projectile projectile, int &damage, float &knockback, bool &crit ) : void
projectile Terraria.Projectile
damage int
knockback float
crit bool
Результат void

ModifyHitNPC() публичный метод

public ModifyHitNPC ( Terraria.NPC target, int &damage, float &knockback, bool &crit ) : void
target Terraria.NPC
damage int
knockback float
crit bool
Результат void

ModifyHitPlayer() публичный метод

public ModifyHitPlayer ( Player target, int &damage, bool &crit ) : void
target Terraria.Player
damage int
crit bool
Результат void

NPCLoot() публичный метод

public NPCLoot ( ) : void
Результат void

OnChatButtonClicked() публичный метод

public OnChatButtonClicked ( bool firstButton, bool &shop ) : void
firstButton bool
shop bool
Результат void

OnHitByItem() публичный метод

public OnHitByItem ( Player player, Item item, int damage, float knockback, bool crit ) : void
player Terraria.Player
item Item
damage int
knockback float
crit bool
Результат void

OnHitByProjectile() публичный метод

public OnHitByProjectile ( Projectile projectile, int damage, float knockback, bool crit ) : void
projectile Terraria.Projectile
damage int
knockback float
crit bool
Результат void

OnHitNPC() публичный метод

public OnHitNPC ( Terraria.NPC target, int damage, float knockback, bool crit ) : void
target Terraria.NPC
damage int
knockback float
crit bool
Результат void

OnHitPlayer() публичный метод

public OnHitPlayer ( Player target, int damage, bool crit ) : void
target Terraria.Player
damage int
crit bool
Результат void

PostAI() публичный метод

public PostAI ( ) : void
Результат void

PostDraw() публичный метод

public PostDraw ( SpriteBatch spriteBatch, Color drawColor ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
drawColor Color
Результат void

PreAI() публичный метод

public PreAI ( ) : bool
Результат bool

PreDraw() публичный метод

public PreDraw ( SpriteBatch spriteBatch, Color drawColor ) : bool
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
drawColor Color
Результат bool

PreNPCLoot() публичный метод

public PreNPCLoot ( ) : bool
Результат bool

ReceiveExtraAI() публичный метод

public ReceiveExtraAI ( BinaryReader reader ) : void
reader System.IO.BinaryReader
Результат void

ResetEffects() публичный метод

public ResetEffects ( ) : void
Результат void

ScaleExpertStats() публичный метод

public ScaleExpertStats ( int numPlayers, float bossLifeScale ) : void
numPlayers int
bossLifeScale float
Результат void

SendExtraAI() публичный метод

public SendExtraAI ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter
Результат void

SetChatButtons() публичный метод

public SetChatButtons ( string &button, string &button2 ) : void
button string
button2 string
Результат void

SetDefaults() публичный метод

public SetDefaults ( ) : void
Результат void

SetupShop() публичный метод

public SetupShop ( Chest shop, int &nextSlot ) : void
shop Terraria.Chest
nextSlot int
Результат void

SpawnNPC() публичный метод

public SpawnNPC ( int tileX, int tileY ) : int
tileX int
tileY int
Результат int

StrikeNPC() публичный метод

public StrikeNPC ( double &damage, int defense, float &knockback, int hitDirection, bool &crit ) : bool
damage double
defense int
knockback float
hitDirection int
crit bool
Результат bool

TownNPCAttackCooldown() публичный метод

public TownNPCAttackCooldown ( int &cooldown, int &randExtraCooldown ) : void
cooldown int
randExtraCooldown int
Результат void

TownNPCAttackMagic() публичный метод

public TownNPCAttackMagic ( float &auraLightMultiplier ) : void
auraLightMultiplier float
Результат void

TownNPCAttackProj() публичный метод

public TownNPCAttackProj ( int &projType, int &attackDelay ) : void
projType int
attackDelay int
Результат void

TownNPCAttackProjSpeed() публичный метод

public TownNPCAttackProjSpeed ( float &multiplier, float &gravityCorrection, float &randomOffset ) : void
multiplier float
gravityCorrection float
randomOffset float
Результат void

TownNPCAttackShoot() публичный метод

public TownNPCAttackShoot ( bool &inBetweenShots ) : void
inBetweenShots bool
Результат void

TownNPCAttackStrength() публичный метод

public TownNPCAttackStrength ( int &damage, float &knockback ) : void
damage int
knockback float
Результат void

TownNPCAttackSwing() публичный метод

public TownNPCAttackSwing ( int &itemWidth, int &itemHeight ) : void
itemWidth int
itemHeight int
Результат void

TownNPCName() публичный метод

public TownNPCName ( ) : string
Результат string

UpdateLifeRegen() публичный метод

public UpdateLifeRegen ( int &damage ) : void
damage int
Результат void

UsesPartyHat() публичный метод

public UsesPartyHat ( ) : bool
Результат bool

Описание свойств

aiType публичное свойство

public int aiType
Результат int

animationType публичное свойство

public int animationType
Результат int

banner публичное свойство

public int banner
Результат int

bannerItem публичное свойство

public int bannerItem
Результат int

bossBag публичное свойство

public int bossBag
Результат int

drawOffsetY публичное свойство

public float drawOffsetY
Результат float

music публичное свойство

public int music
Результат int