public void Move() { if (Position.Current.X > 10000) { Remove(); return; } switch (_options.Collision.Type) { case ProjectileCollisionType.SpecificTarget: _tweenMovement.Step(_options.Collision.SpecificTarget); break; case ProjectileCollisionType.FirstHit: Position.AddX(_options.MovementSpeed); break; default: throw new ArgumentOutOfRangeException(); } }
public void Move() { if (isReturningToStart && Position.Current != startPosition.Current) { Position.AddX(10); } if (isReturningToStart && Position.Current == startPosition.Current) { isReturningToStart = false; } if (!isReturningToStart) { Position.SubtractX(10); } if (!isReturningToStart && Position.Current.X < -800) { isReturningToStart = true; } }