C# Class Terraria.ModLoader.ModNPC

Afficher le fichier Open project: JavidPack/TerraCustom Class Usage Examples

Méthodes publiques

Свойство Type Description
aiType int
animationType int
banner int
bannerItem int
bossBag int
drawOffsetY float
music int

Méthodes publiques

Méthode 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

Méthode Description
SetupNPC ( Terraria.NPC npc ) : void

Method Details

AI() public méthode

public AI ( ) : void
Résultat void

Autoload() public méthode

public Autoload ( string &name, string &texture, string &altTextures ) : bool
name string
texture string
altTextures string
Résultat bool

AutoloadHead() public méthode

public AutoloadHead ( string &headTexture, string &bossHeadTexture ) : void
headTexture string
bossHeadTexture string
Résultat void

BossHeadRotation() public méthode

public BossHeadRotation ( float &rotation ) : void
rotation float
Résultat void

BossHeadSlot() public méthode

public BossHeadSlot ( int &index ) : void
index int
Résultat void

BossHeadSpriteEffects() public méthode

public BossHeadSpriteEffects ( SpriteEffects &spriteEffects ) : void
spriteEffects SpriteEffects
Résultat void

BossLoot() public méthode

public BossLoot ( string &name, int &potionType ) : void
name string
potionType int
Résultat void

CanBeHitByItem() public méthode

public CanBeHitByItem ( Player player, Item item ) : bool?
player Terraria.Player
item Item
Résultat bool?

CanBeHitByProjectile() public méthode

public CanBeHitByProjectile ( Projectile projectile ) : bool?
projectile Terraria.Projectile
Résultat bool?

CanHitNPC() public méthode

public CanHitNPC ( Terraria.NPC target ) : bool?
target Terraria.NPC
Résultat bool?

CanHitPlayer() public méthode

public CanHitPlayer ( Player target, int &cooldownSlot ) : bool
target Terraria.Player
cooldownSlot int
Résultat bool

CanSpawn() public méthode

public CanSpawn ( Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : float
spawnInfo Terraria.ModLoader.NPCSpawnInfo
Résultat float

CanTownNPCSpawn() public méthode

public CanTownNPCSpawn ( int numTownNPCs, int money ) : bool
numTownNPCs int
money int
Résultat bool

CheckActive() public méthode

public CheckActive ( ) : bool
Résultat bool

CheckConditions() public méthode

public CheckConditions ( int left, int right, int top, int bottom ) : bool
left int
right int
top int
bottom int
Résultat bool

CheckDead() public méthode

public CheckDead ( ) : bool
Résultat bool

DrawEffects() public méthode

public DrawEffects ( Color &drawColor ) : void
drawColor Color
Résultat void

DrawHealthBar() public méthode

public DrawHealthBar ( byte hbPosition, float &scale, Vector2 &position ) : bool?
hbPosition byte
scale float
position Vector2
Résultat bool?

DrawTownAttackGun() public méthode

public DrawTownAttackGun ( float &scale, int &item, int &closeness ) : void
scale float
item int
closeness int
Résultat void

DrawTownAttackSwing() public méthode

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

FindFrame() public méthode

public FindFrame ( int frameHeight ) : void
frameHeight int
Résultat void

GetAlpha() public méthode

public GetAlpha ( Color drawColor ) : Color?
drawColor Color
Résultat Color?

GetChat() public méthode

public GetChat ( ) : string
Résultat string

HitEffect() public méthode

public HitEffect ( int hitDirection, double damage ) : void
hitDirection int
damage double
Résultat void

ModNPC() public méthode

public ModNPC ( ) : System
Résultat System

ModifyHitByItem() public méthode

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

ModifyHitByProjectile() public méthode

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

ModifyHitNPC() public méthode

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

ModifyHitPlayer() public méthode

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

NPCLoot() public méthode

public NPCLoot ( ) : void
Résultat void

OnChatButtonClicked() public méthode

public OnChatButtonClicked ( bool firstButton, bool &shop ) : void
firstButton bool
shop bool
Résultat void

OnHitByItem() public méthode

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

OnHitByProjectile() public méthode

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

OnHitNPC() public méthode

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

OnHitPlayer() public méthode

public OnHitPlayer ( Player target, int damage, bool crit ) : void
target Terraria.Player
damage int
crit bool
Résultat void

PostAI() public méthode

public PostAI ( ) : void
Résultat void

PostDraw() public méthode

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

PreAI() public méthode

public PreAI ( ) : bool
Résultat bool

PreDraw() public méthode

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

PreNPCLoot() public méthode

public PreNPCLoot ( ) : bool
Résultat bool

ReceiveExtraAI() public méthode

public ReceiveExtraAI ( BinaryReader reader ) : void
reader System.IO.BinaryReader
Résultat void

ResetEffects() public méthode

public ResetEffects ( ) : void
Résultat void

ScaleExpertStats() public méthode

public ScaleExpertStats ( int numPlayers, float bossLifeScale ) : void
numPlayers int
bossLifeScale float
Résultat void

SendExtraAI() public méthode

public SendExtraAI ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter
Résultat void

SetChatButtons() public méthode

public SetChatButtons ( string &button, string &button2 ) : void
button string
button2 string
Résultat void

SetDefaults() public méthode

public SetDefaults ( ) : void
Résultat void

SetupShop() public méthode

public SetupShop ( Chest shop, int &nextSlot ) : void
shop Terraria.Chest
nextSlot int
Résultat void

SpawnNPC() public méthode

public SpawnNPC ( int tileX, int tileY ) : int
tileX int
tileY int
Résultat int

StrikeNPC() public méthode

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

TownNPCAttackCooldown() public méthode

public TownNPCAttackCooldown ( int &cooldown, int &randExtraCooldown ) : void
cooldown int
randExtraCooldown int
Résultat void

TownNPCAttackMagic() public méthode

public TownNPCAttackMagic ( float &auraLightMultiplier ) : void
auraLightMultiplier float
Résultat void

TownNPCAttackProj() public méthode

public TownNPCAttackProj ( int &projType, int &attackDelay ) : void
projType int
attackDelay int
Résultat void

TownNPCAttackProjSpeed() public méthode

public TownNPCAttackProjSpeed ( float &multiplier, float &gravityCorrection, float &randomOffset ) : void
multiplier float
gravityCorrection float
randomOffset float
Résultat void

TownNPCAttackShoot() public méthode

public TownNPCAttackShoot ( bool &inBetweenShots ) : void
inBetweenShots bool
Résultat void

TownNPCAttackStrength() public méthode

public TownNPCAttackStrength ( int &damage, float &knockback ) : void
damage int
knockback float
Résultat void

TownNPCAttackSwing() public méthode

public TownNPCAttackSwing ( int &itemWidth, int &itemHeight ) : void
itemWidth int
itemHeight int
Résultat void

TownNPCName() public méthode

public TownNPCName ( ) : string
Résultat string

UpdateLifeRegen() public méthode

public UpdateLifeRegen ( int &damage ) : void
damage int
Résultat void

UsesPartyHat() public méthode

public UsesPartyHat ( ) : bool
Résultat bool

Property Details

aiType public_oe property

public int aiType
Résultat int

animationType public_oe property

public int animationType
Résultat int

banner public_oe property

public int banner
Résultat int

bannerItem public_oe property

public int bannerItem
Résultat int

bossBag public_oe property

public int bossBag
Résultat int

drawOffsetY public_oe property

public float drawOffsetY
Résultat float

music public_oe property

public int music
Résultat int