Game Development Reference
In-Depth Information
this._name = name;
As you will notice when viewing the solution files on the Companion Web site, the
entity definitions reside in an independent library, completely isolated from any
processing functionality that uses these entities.
This module fits into the “Reusable Functionality” category in Figure 8.1.
Object Processing
Almost every system defines objects that represent business entities, and almost
every system provides functionality that performs processing on these entities.
This is one area where it is important that future reusability be taken into consid-
eration. All functionality placed in this module should have the potential for
applicability towards multiple projects. It is essential that you refrain from placing
specific tool logic in this module.
This example assembly contains a single static method that inputs a SimpleObject
and builds an alert message based on its name.
Here is the code for the simple object processing method for this example:
using ObjectDefinitions;
public class Library
public static string FormatOutput(SimpleObject simpleObject)
return String.Format(“The name of this SimpleObject is {0}!”,
Notice how this assembly references the other class library containing the entity
object definitions.
This module fits into the “Reusable Functionality” category in Figure 8.1.
Alert Object Tool Interface
Now that our simple framework has been created, it is time to build our tool! In
order to facilitate either a COM or remoting entry point, we must define a public
interface that our tool implements. That is what this module is for.
Search Nedrilad ::

Custom Search