Plastix / PixelPilot

A top down dogfighting game with pixel graphics.
0 stars 0 forks source link

Controllers are built when we parse Plane Presets #51

Closed Plastix closed 9 years ago

Plastix commented 9 years ago

This means (currently) when we pass presets into the plane factory it passes in the controller built by the yaml serializer. Therefore, all AI planes (with the same controller type) share the same controller instances.!

Plastix commented 9 years ago

I'm thinking when we register a controller we add the class to a list somewhere. Then the serializer returns the class of the controller.

This means a planepreset will have a controller class. When you put that into the PlaneFactory it will create a new controller instance.