com.annahid.libs.artenus
Artenus
The abstract superclass of a typical Artenus SDK activity. This class should be
extended by the game application and the init() method must be implemented
to handle basic initializations and retrieving the stage.
public abstract class Artenus extends Activity
Constructor Summary
Modifier and Type | Constructor and Description |
---|---|
protected | Artenus(boolean hideIntro) Creates a new instance of Artenus activity. |
protected | Artenus() Creates a new instance of Artenus activity. |
Method Summary
Modifier and Type | Method and Description |
---|---|
public final void | exit() Exits the game or application. |
public static Artenus | getInstance() Gets the currently running instance of Artenus. |
public static Stores | getManifestAppStore() Gets the store preference specified in the application manifest for unified services. |
public Stage | getStage() Gets the game stage. |
protected abstract void | init(Stage stage) Initializes the game. |
protected void | onActivityResult(int requestCode, int resultCode, Intent data) |
public void | onCreate(Bundle savedInstanceState) |
protected void | onDestroy() |
public boolean | onKeyDown(int keyCode, KeyEvent event) |
public boolean | onKeyUp(int keyCode, KeyEvent event) |
protected void | onPause() |
protected void | onResume() |
protected void | onStart() |
protected void | onStop() |
public void | onWindowFocusChanged(boolean hasFocus) |
public static boolean | shouldHideIntro() Determines whether an intro screen should be displayed before the game. |
Methods inherited from java.lang.Object
clone
, equals
, finalize
, getClass
, hashCode
, notify
, notifyAll
, toString
, wait
, wait
, wait
Constructor Detail
Artenus | ||
---|---|---|
protected Artenus( boolean hideIntro )Creates a new instance of Artenus activity. Parameters:
|
Artenus |
---|
protected Artenus()Creates a new instance of Artenus activity. |
Method Detail
exit |
---|
public final void exit() Exits the game or application. This is the recommended method to exit within the framework. |
getInstance |
---|
public static Artenus getInstance() Gets the currently running instance of Artenus. Returns:
The running instance |
getManifestAppStore |
---|
public static Stores getManifestAppStore() Gets the store preference specified in the application manifest for unified services. Returns:
Store identifier See Also:
|
getStage |
---|
public Stage getStage() Gets the game stage. Each game has only one stage, where its different scenes are displayed. Returns:
The stage |
init | ||
---|---|---|
protected abstract void init( Stage stage ) Initializes the game. Subclasses should implement this method and use it as an entry point to
load textures and other resources into the framework. Parameters:
|
onActivityResult |
---|
protected void onActivityResult( int requestCode, int resultCode, Intent data ) |
onCreate |
---|
public void onCreate( Bundle savedInstanceState ) |
onDestroy |
---|
protected void onDestroy() |
onKeyDown |
---|
public boolean onKeyDown( int keyCode, KeyEvent event ) |
onKeyUp |
---|
public boolean onKeyUp( int keyCode, KeyEvent event ) |
onPause |
---|
protected void onPause() |
onResume |
---|
protected void onResume() |
onStart |
---|
protected void onStart() |
onStop |
---|
protected void onStop() |
onWindowFocusChanged |
---|
public void onWindowFocusChanged( boolean hasFocus ) |
shouldHideIntro |
---|
public static boolean shouldHideIntro() Determines whether an intro screen should be displayed before the game. Returns:
true if there should be an intro, false otherwise |