public override void OnStatusStay(GameObject entity) { //Start of the up special if (durationLeft < START_DURATION) { targetVelocity = Vector2.zero; } //Movement of the up special else if (durationLeft < START_DURATION + MOVEMENT_DURATION) { float speedMultiplier = 1.0f + 0.5f * passive.GetStaticCharge() / passive.maxStaticCharge; targetVelocity = new Vector2(character.IsFacingRight ? sideSpecialSpeed * speedMultiplier * ratio : -sideSpecialSpeed * speedMultiplier * ratio, 0); } //End of the up special else if (durationLeft < frameDuration) { targetVelocity = new Vector2(character.GetTargetVelocity(character.Velocity.x, 0.0f, sideSpecialDecelerationRate), character.GetTargetVelocity(character.Velocity.y, 0.0f, sideSpecialDecelerationRate)); } if (durationLeft == EDGE_SNAP_FRAME) { snapToEdge = true; character.CanGrabEdge = true; } if (durationLeft == EDGE_SNAP_FRAME + EDGE_SNAP_DURATION) { snapToEdge = false; character.CanGrabEdge = false; } base.OnStatusStay(entity); }
public override void OnStatusStay(GameObject entity) { foreach (IModifier modifier in modifiers) { modifier.ModifyValue = 1.0f + 0.05f * passive.GetStaticCharge(); } }
public override void ActivateHitboxes() { activated = true; float strengthMultiplier = 1.0f + 0.5f * passive.GetStaticCharge() / passive.maxStaticCharge; foreach (IHitbox hitbox in list) { //hitbox.SetDamage(hitbox.GetDamage() * strengthMultiplier); } CheckHitboxes(); }