initFrom method

  1. @override
void initFrom(
  1. Behaviour oldBehaviour
)
override

Called when this behaviour should be initialized from an old behaviour.

Implementation

@override
void initFrom(Behaviour oldBehaviour) {
  if (oldBehaviour is SpaceBehaviour) {
    stars = oldBehaviour.stars;
    center = oldBehaviour.center;
    targetCenter = oldBehaviour.targetCenter;
  }
}