- @override
Called when the actor is instantiated in the world
Source
@override void initialize(World world) { super.initialize(world); maxSpeed = 400.0; name = "Character"; this.onLivesChange = _livesChangeEvent.stream.asBroadcastStream(); new Observable(this.onCollide) .where((Actor a) => a is Enemy) .throttle(new Duration(seconds: 1)) .listen( (Actor a) => this._touchedEnemy()); }