- @override
Called when the actor is instantiated in the world
Source
@override void initialize(World world) { super.initialize(world); this.name = "Enemy" + world.genUID(); this.onCozynessChange = _cozynessChangeEvent.stream.asBroadcastStream(); new Observable( this.onCollide ) .throttle( new Duration(milliseconds: 700) ) .listen( (Actor a) => this._collided(a) ); }