Libraries.Game.AndroidConfiguration Documentation
Inherits from: Libraries.Language.Object, Libraries.Game.ApplicationConfiguration
Summary
Variable Summary Table
Variables | Description |
---|---|
integer samplesCount | Number of samples to use for CSAA/MSAA. 2 is a good value. |
integer defaultOrientation | What 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. |
integer targetHeight | How 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. |
integer targetWidth | How 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 maxSimultaneousSounds | The maximum number of sounds that can be played simultaneously. The default value is 16. |
boolean useAccelerometer | Whether or not to use the accelerometer for the game. Default value is false. |
number multipleTapTimer | The 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. |
boolean useCompass | Whether or not to use the compass for the game. Default value is false. |
boolean hideStatusBar | Whether or not to hide status bar buttons on Android 4.0 and higher. Default value is false. |
integer touchSleepTime | The 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. |
integer PORTRAIT | What 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 disableAudio | Whether or not to disable Android audio support. Default value is false. |
boolean useImmersiveMode | Whether or not to use Android 4.4 KitKat's "Immersive mode'. Default value is false. |
boolean useAspectRatio | If useAspectRatio is true, the engine will try to set the display to use the largest possible display of the aspect ratio given (targetWidth/targetHeight). |
boolean preventScreenDimming | Whether or not to prevent the screen from dimming due to inactivity. The default value is true. |
integer LANDSCAPE |
Actions Summary Table
Actions | Description |
---|---|
Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |
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 an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Example Code
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: 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
- Libraries.Language.Object: The to be compared.
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.