Libraries.Game.AndroidConfiguration Documentation

Inherits from: Libraries.Language.Object, Libraries.Game.ApplicationConfiguration

Summary

Variable Summary Table

VariablesDescription
boolean useAspectRatioIf useAspectRatio is true, the engine will try to set the display to use the largest possible display of the aspect ratio given (targetWidth/targetHeight).
integer PORTRAIT
integer targetHeightHow tall the engine should try to make the display. If the value is 0, the entire height of the physical screen will be used. Otherwise, if useAspectRatio is true, the display will fill the screen as much as possible while maintaining the ratio of targetWidth/targetHeight. If useAspectRatio is false, the engine will try to make the display the exact target height, if possible. Users may want to use the SetDisplayTo actions for convenience.
boolean preventScreenDimmingWhether or not to prevent the screen from dimming due to inactivity. The default value is true.
integer targetWidthHow wide the engine should try to make the display. If the value is 0, the entire width of the physical screen will be used. Otherwise, if useAspectRatio is true, the display will fill the screen as much as possible while maintaining the ratio of targetWidth/targetHeight. If useAspectRatio is false, the engine will try to make the display the exact target width, if possible. Users may want to use the SetDisplayTo actions for convenience.
integer LANDSCAPE
integer defaultOrientationWhat orientation the phone should be in by default when running a Game. This should be one of either the LANDSCAPE or PORTRAIT constants. The default value is LANDSCAPE.
boolean hideStatusBarWhether or not to hide status bar buttons on Android 4.0 and higher. Default value is false.
boolean useCompassWhether or not to use the compass for the game. Default value is false.
integer samplesCountNumber of samples to use for CSAA/MSAA. 2 is a good value.
boolean useImmersiveModeWhether or not to use Android 4.4 KitKat's "Immersive mode'. Default value is false.
boolean useAccelerometerWhether or not to use the accelerometer for the game. Default value is false.
integer touchSleepTimeThe time in milliseconds to delay after each touch event before registering more touch events. For Android devices before Android 2.0, a value of 16 is useful for preventing a flood of touch events.
boolean disableAudioWhether or not to disable Android audio support. Default value is false.
number multipleTapTimerThe maximum number of seconds allowed between each touch event before the tap is no longer considered related to the previous tap. This is used for things such as double-tap input.
integer maxSimultaneousSoundsThe maximum number of sounds that can be played simultaneously. The default value is 16.

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetHashCode()This action gets the hash code for an object.
SetScreenToAspectRatio(integer width, integer height)This action will set the game display to fill the screen as much as possible while maintaining the given aspect ratio, where the aspect ratio is the given width divided by the given height.
SetScreenToFill()This action will set the game display to fill the entire screen of the device.
SetScreenToSize(integer width, integer height)This action will set the game display to appear in the center of the screen with the given width and height.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

SetScreenToAspectRatio(integer width, integer height)

This action will set the game display to fill the screen as much as possible while maintaining the given aspect ratio, where the aspect ratio is the given width divided by the given height.

Parameters

SetScreenToFill()

This action will set the game display to fill the entire screen of the device. This is the default screen display mode.

SetScreenToSize(integer width, integer height)

This action will set the game display to appear in the center of the screen with the given width and height.

Parameters