Artenus 2D Framework
Artenus Reference
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 TypeConstructor 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 TypeMethod and Description
public final voidexit()
Exits the game or application.
public static ArtenusgetInstance()
Gets the currently running instance of Artenus.
public static StoresgetManifestAppStore()
Gets the store preference specified in the application manifest for unified services.
public StagegetStage()
Gets the game stage.
protected abstract voidinit(Stage stage)
Initializes the game.
protected voidonActivityResult(int requestCode, int resultCode, Intent data)
public voidonCreate(Bundle savedInstanceState)
protected voidonDestroy()
public booleanonKeyDown(int keyCode, KeyEvent event)
public booleanonKeyUp(int keyCode, KeyEvent event)
protected voidonPause()
protected voidonResume()
protected voidonStart()
protected voidonStop()
public voidonWindowFocusChanged(boolean hasFocus)
public static booleanshouldHideIntro()
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:
hideIntroA value indicating whether to hide the initial splash screen
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:
stageThe stage for the game
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