This method sets a variety of Item values common to spear weapons.
Specifically:
useStyle = F:Terraria.ID.ItemUseStyleID.Shoot; useAnimation = animationTime; useTime = animationTime; shootSpeed = pushForwardSpeed; width = 32; height = 32; UseSound = SoundID.Item1; shoot = projType; noMelee = true; noUseGraphic = true; DamageType = DamageClass.Melee;
- Parameters
-
| projType | |
| pushForwardSpeed | |
| animationTime | |
Definition at line 48004 of file Item.cs.
48005 {
48018 }
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle Item1
SoundStyle? UseSound
The sound this item makes when used. Set this to an existing T:Terraria.ID.SoundID entry or assign to...
int useAnimation
The time span of the using animation for the item in ticks. This is independent of the time it takes ...
bool noMelee
If true, the item's using animation will not deal damage. Set to true on most weapons that aren't swo...
int shoot
The ID of the projectile that is fired by this item on use. Either a T:Terraria.ID....
int useStyle
Assign to an T:Terraria.ID.ItemUseStyleID value to give this item a specific animation while in use....
bool noUseGraphic
If true, the item's sprite will not be visible while the item is in use. Defaults to false.
float shootSpeed
The velocity in pixels the projectile fired by this item will have. Actual velocity depends on the pr...
int useTime
The time span of using the item in ticks. This is independent of the time it takes for the item anima...
References Terraria.Entity.height, Terraria.ID.SoundID.Item1, Terraria.Item.melee, Terraria.Item.noMelee, Terraria.Item.noUseGraphic, Terraria.Item.shoot, Terraria.Item.shootSpeed, Terraria.Item.useAnimation, Terraria.Item.UseSound, Terraria.Item.useStyle, Terraria.Item.useTime, and Terraria.Entity.width.
Referenced by Terraria.Item.SetDefaults5().