Game Development Reference
In-Depth Information
refactoring shortcuts can be used to create them automatically. Right-click the
IGameObject
text and a context menu will appear, as shown in Figure 6.1.
There are two options. Implement Interface Explicitly will do the same as Im-
plement Interface but instead of creating the method
Render()
, it will create
the method
IGameObject.Render();
, explicitly describing where the
method comes from. Here is the code once the refactoring tools have im-
plemented the
IGameObject
interface.
class SplashScreenState : IGameObject
{
#region IGameObject Members
public void Update(double elapsedTime)
{
throw new NotImplementedException();
}
Figure 6.1
Implementing an interface.
Search WWH ::
Custom Search