public override void OnUpdate(float deltaTime) { lifetime -= 1 * deltaTime; if (lifetime <= 0) { proDel = true; } projectileCollider.Resize(new MathHelpers.Vector3(GlobalTransform.m7, GlobalTransform.m8, 0), 6); MathHelpers.Vector3 facing = new MathHelpers.Vector3(direction.x, direction.y, 1) * deltaTime * speed; Translate(facing.x, facing.y); }
public Projectile(MathHelpers.Vector3 d) { direction = d; }