public final class GdxAI extends Object
Timepiece, Logger 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 Logger |
getLogger() |
static Timepiece |
getTimepiece()
Returns the timepiece service.
|
static void |
setTimepiece(Timepiece timepiece)
Sets the timepiece service.
|
Copyright © 2018. All rights reserved.