public final class GdxAI
extends java.lang.Object
Timepiece, Logger and FileSystem instances. The references
are held in static fields which allows static access to all sub systems.
Basically, this class is the locator of the service locator design pattern. The locator contains references to the services and encapsulates the logic that locates them. Being a decoupling pattern, the service locator provides a global point of access to a set of services without coupling users to the concrete classes that implement them.
The gdx-ai framework internally uses the service locator to give you the ability to use the framework out of a libgdx application. In this scenario, the libgdx jar must still be in the classpath but you don't need native libraries since the libgdx environment is not initialized at all.
Also, this service locator automatically configures itself with proper service providers in the situations below:
| Modifier and Type | Method and Description |
|---|---|
static FileSystem |
getFileSystem()
Returns the filesystem service.
|
static Logger |
getLogger()
Returns the logger service.
|
static Timepiece |
getTimepiece()
Returns the timepiece service.
|
static void |
setFileSystem(FileSystem fileSystem)
Sets the filesystem service.
|
static void |
setLogger(Logger logger)
Sets the logger service.
|
static void |
setTimepiece(Timepiece timepiece)
Sets the timepiece service.
|
public static Timepiece getTimepiece()
public static void setTimepiece(Timepiece timepiece)
public static Logger getLogger()
public static void setLogger(Logger logger)
public static FileSystem getFileSystem()
public static void setFileSystem(FileSystem fileSystem)