createInstance method

  1. @override
ScreenBounceSystem<T> createInstance()
override

Override to provide a fresh uninitialized instance of this type.

Required for cloning to work. Example:

@override
MyEntity createInstance() => MyEntity(app);

Implementation

@override
ScreenBounceSystem<T> createInstance() => .new(app,
  restitution: restitution,
  top: top,
  left: left,
  bottom: bottom,
  right: right,
);