Class: Projectile
Represents a projectile in SF2. A projectile has its own hitbox and updates independently of the player who created it. This class has no sub-classes.
Properties
animations
{Object.<Animation>}Animations by animation name. This is a
prototype
property that is the same for all instances.type
{string}Type of projectile. This can be
"hadouken"
,"sonicBoom"
,"yogaFire"
,"yogaFlame"
, or"tigerShot"
.position
{Point}Current position of this projectile. Used for hitbox calculations.
positionUnclipped
{Point}Current position of this projectile with sub-pixel accuracy. Used for movement calculations.
flipX
{boolean}If this projectile's hitbox is flipped.
velocityX
{number}Current horizontal velocity of this projectile. Every tick will add the velocity to the current position. I think this stays constant throughout the projectile's lifespan.
velocityY
{number}Always 0 in this game.