C# Class Terraria.ModLoader.ModNPC

ファイルを表示 Open project: JavidPack/TerraCustom Class Usage Examples

Public Properties

Property Type Description
aiType int
animationType int
banner int
bannerItem int
bossBag int
drawOffsetY float
music int

Public Methods

Method Description
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

Private Methods

Method Description
SetupNPC ( Terraria.NPC npc ) : void

Method Details

AI() public method

public AI ( ) : void
return void

Autoload() public method

public Autoload ( string &name, string &texture, string &altTextures ) : bool
name string
texture string
altTextures string
return bool

AutoloadHead() public method

public AutoloadHead ( string &headTexture, string &bossHeadTexture ) : void
headTexture string
bossHeadTexture string
return void

BossHeadRotation() public method

public BossHeadRotation ( float &rotation ) : void
rotation float
return void

BossHeadSlot() public method

public BossHeadSlot ( int &index ) : void
index int
return void

BossHeadSpriteEffects() public method

public BossHeadSpriteEffects ( SpriteEffects &spriteEffects ) : void
spriteEffects SpriteEffects
return void

BossLoot() public method

public BossLoot ( string &name, int &potionType ) : void
name string
potionType int
return void

CanBeHitByItem() public method

public CanBeHitByItem ( Player player, Item item ) : bool?
player Terraria.Player
item Item
return bool?

CanBeHitByProjectile() public method

public CanBeHitByProjectile ( Projectile projectile ) : bool?
projectile Terraria.Projectile
return bool?

CanHitNPC() public method

public CanHitNPC ( Terraria.NPC target ) : bool?
target Terraria.NPC
return bool?

CanHitPlayer() public method

public CanHitPlayer ( Player target, int &cooldownSlot ) : bool
target Terraria.Player
cooldownSlot int
return bool

CanSpawn() public method

public CanSpawn ( Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : float
spawnInfo Terraria.ModLoader.NPCSpawnInfo
return float

CanTownNPCSpawn() public method

public CanTownNPCSpawn ( int numTownNPCs, int money ) : bool
numTownNPCs int
money int
return bool

CheckActive() public method

public CheckActive ( ) : bool
return bool

CheckConditions() public method

public CheckConditions ( int left, int right, int top, int bottom ) : bool
left int
right int
top int
bottom int
return bool

CheckDead() public method

public CheckDead ( ) : bool
return bool

DrawEffects() public method

public DrawEffects ( Color &drawColor ) : void
drawColor Color
return void

DrawHealthBar() public method

public DrawHealthBar ( byte hbPosition, float &scale, Vector2 &position ) : bool?
hbPosition byte
scale float
position Vector2
return bool?

DrawTownAttackGun() public method

public DrawTownAttackGun ( float &scale, int &item, int &closeness ) : void
scale float
item int
closeness int
return void

DrawTownAttackSwing() public method

public DrawTownAttackSwing ( Texture2D &item, int &itemSize, float &scale, Vector2 &offset ) : void
item Texture2D
itemSize int
scale float
offset Vector2
return void

FindFrame() public method

public FindFrame ( int frameHeight ) : void
frameHeight int
return void

GetAlpha() public method

public GetAlpha ( Color drawColor ) : Color?
drawColor Color
return Color?

GetChat() public method

public GetChat ( ) : string
return string

HitEffect() public method

public HitEffect ( int hitDirection, double damage ) : void
hitDirection int
damage double
return void

ModNPC() public method

public ModNPC ( ) : System
return System

ModifyHitByItem() public method

public ModifyHitByItem ( Player player, Item item, int &damage, float &knockback, bool &crit ) : void
player Terraria.Player
item Item
damage int
knockback float
crit bool
return void

ModifyHitByProjectile() public method

public ModifyHitByProjectile ( Projectile projectile, int &damage, float &knockback, bool &crit ) : void
projectile Terraria.Projectile
damage int
knockback float
crit bool
return void

ModifyHitNPC() public method

public ModifyHitNPC ( Terraria.NPC target, int &damage, float &knockback, bool &crit ) : void
target Terraria.NPC
damage int
knockback float
crit bool
return void

ModifyHitPlayer() public method

public ModifyHitPlayer ( Player target, int &damage, bool &crit ) : void
target Terraria.Player
damage int
crit bool
return void

NPCLoot() public method

public NPCLoot ( ) : void
return void

OnChatButtonClicked() public method

public OnChatButtonClicked ( bool firstButton, bool &shop ) : void
firstButton bool
shop bool
return void

OnHitByItem() public method

public OnHitByItem ( Player player, Item item, int damage, float knockback, bool crit ) : void
player Terraria.Player
item Item
damage int
knockback float
crit bool
return void

OnHitByProjectile() public method

public OnHitByProjectile ( Projectile projectile, int damage, float knockback, bool crit ) : void
projectile Terraria.Projectile
damage int
knockback float
crit bool
return void

OnHitNPC() public method

public OnHitNPC ( Terraria.NPC target, int damage, float knockback, bool crit ) : void
target Terraria.NPC
damage int
knockback float
crit bool
return void

OnHitPlayer() public method

public OnHitPlayer ( Player target, int damage, bool crit ) : void
target Terraria.Player
damage int
crit bool
return void

PostAI() public method

public PostAI ( ) : void
return void

PostDraw() public method

public PostDraw ( SpriteBatch spriteBatch, Color drawColor ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
drawColor Color
return void

PreAI() public method

public PreAI ( ) : bool
return bool

PreDraw() public method

public PreDraw ( SpriteBatch spriteBatch, Color drawColor ) : bool
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
drawColor Color
return bool

PreNPCLoot() public method

public PreNPCLoot ( ) : bool
return bool

ReceiveExtraAI() public method

public ReceiveExtraAI ( BinaryReader reader ) : void
reader System.IO.BinaryReader
return void

ResetEffects() public method

public ResetEffects ( ) : void
return void

ScaleExpertStats() public method

public ScaleExpertStats ( int numPlayers, float bossLifeScale ) : void
numPlayers int
bossLifeScale float
return void

SendExtraAI() public method

public SendExtraAI ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter
return void

SetChatButtons() public method

public SetChatButtons ( string &button, string &button2 ) : void
button string
button2 string
return void

SetDefaults() public method

public SetDefaults ( ) : void
return void

SetupShop() public method

public SetupShop ( Chest shop, int &nextSlot ) : void
shop Terraria.Chest
nextSlot int
return void

SpawnNPC() public method

public SpawnNPC ( int tileX, int tileY ) : int
tileX int
tileY int
return int

StrikeNPC() public method

public StrikeNPC ( double &damage, int defense, float &knockback, int hitDirection, bool &crit ) : bool
damage double
defense int
knockback float
hitDirection int
crit bool
return bool

TownNPCAttackCooldown() public method

public TownNPCAttackCooldown ( int &cooldown, int &randExtraCooldown ) : void
cooldown int
randExtraCooldown int
return void

TownNPCAttackMagic() public method

public TownNPCAttackMagic ( float &auraLightMultiplier ) : void
auraLightMultiplier float
return void

TownNPCAttackProj() public method

public TownNPCAttackProj ( int &projType, int &attackDelay ) : void
projType int
attackDelay int
return void

TownNPCAttackProjSpeed() public method

public TownNPCAttackProjSpeed ( float &multiplier, float &gravityCorrection, float &randomOffset ) : void
multiplier float
gravityCorrection float
randomOffset float
return void

TownNPCAttackShoot() public method

public TownNPCAttackShoot ( bool &inBetweenShots ) : void
inBetweenShots bool
return void

TownNPCAttackStrength() public method

public TownNPCAttackStrength ( int &damage, float &knockback ) : void
damage int
knockback float
return void

TownNPCAttackSwing() public method

public TownNPCAttackSwing ( int &itemWidth, int &itemHeight ) : void
itemWidth int
itemHeight int
return void

TownNPCName() public method

public TownNPCName ( ) : string
return string

UpdateLifeRegen() public method

public UpdateLifeRegen ( int &damage ) : void
damage int
return void

UsesPartyHat() public method

public UsesPartyHat ( ) : bool
return bool

Property Details

aiType public_oe property

public int aiType
return int

animationType public_oe property

public int animationType
return int

banner public_oe property

public int banner
return int

bannerItem public_oe property

public int bannerItem
return int

bossBag public_oe property

public int bossBag
return int

drawOffsetY public_oe property

public float drawOffsetY
return float

music public_oe property

public int music
return int