jasjisdo / gtge

Automatically exported from code.google.com/p/gtge
2 stars 2 forks source link

GameEngine requires GameObject implementation #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The GameEngine class requires a GameObject implementation.  While the 
GameObject implementation is the easiest to use, and should continue to be 
supported in tutorials, etc, creating an interface that the GameEngine 
relies upon (and having the GameObject implement it) will separate this 
out (which will also allow Game objects to be plugged into the GameEngine 
if needed later).

My suggestion for the interface name is GameEngineAddable

public interface GameEngineAddable {
    public void addGameEngine(GameEngine parent);
}

The GameObject class would implement this, and its constructor would 
delegate to this method. 

Original issue reported on code.google.com by MetroidF...@gmail.com on 29 Mar 2008 at 11:20

GoogleCodeExporter commented 8 years ago
You would have to add the methode start() to the interface to make this work. 

But why would we want to do this? Do we really want custom GameObject-
implementations? If some others really want this too, I can implement it.

Original comment by cedricbe...@gmail.com on 4 Apr 2008 at 11:32