protected override void OnEventFired(object source, EntityCreationFinishedEventArgs args) { IMovementData movementData = MovementDataMappable.RetrieveEntity(args.EntityGuid); IMovementGenerator <IWorldObject> generator = MovementGeneratorFactory.Create(new EntityAssociatedData <IMovementData>(args.EntityGuid, movementData)); MovementGeneratorMappable.AddObject(args.EntityGuid, generator); }
protected override void OnEventFired(object source, EntityWorldObjectCreatedEventArgs args) { IMovementData movementData = MovementDataMappable.RetrieveEntity(args.EntityGuid); IMovementGenerator <IWorldObject> generator = MovementGeneratorFactory.Create(new EntityAssociatedData <IMovementData>(args.EntityGuid, movementData)); MovementGeneratorMappable.AddObject(args.EntityGuid, generator); InitializePosition(args.EntityGuid, movementData, generator, args.WorldReprensetation); }