Skip to content

Namespaces

Maverick Peppers edited this page Oct 28, 2018 · 24 revisions

Namespaces

Swoosh as a stand-alone library also comes with other utilities specific to but not limited to gaming.

using namespace swoosh;

The basics

  • class Activity
  • class Segue
  • class ActivityController
  • class Timer

using namespace swoosh::intent;

Aliases tucked away to make the library easier to use

  • typename segue<Segue, Duration>::to<Destination>
  • typename seconds
  • typename milliseconds
  • typename microseconds

using namespace swoosh::game;

Game logic and utility functions to shorten SFML code

  • function bool doesCollide(a, b)
  • function double angleTo(subject, target)
  • function vector2 normalize(input)
  • function vector2 direction(target, dest)
  • function void setOrigin(sprite, fx, fy)
  • function void setOrigin(text, fx, fy)

using namespace swoosh::ease;

Math that makes cool animations over time with little effort

  • function double linear(elapsed, duration, exponent)
  • function double wideParabola(elapsed, duration, exponent)
Clone this wiki locally