Game settings||doc135357

September 20, 2022



GameSettings is a class for our game settings. We can use the properties and function calls in it to set the game globally according to the player's own preferences, which has achieved the game effect the player wants.


float poleForward

Direction control for joystick forward and backward (> 0: forward, < 0: backward, = 0: still)

void poleStrafe

Joystick left and right direction control (> 0: left, < 0: right, = 0: still)

boolean hideCloud

whether to hide the clouds

boolean hideFog

whether to hide fog

boolean viewBobbing

Whether to show swing

boolean bobbingCameraEffect

Whether to set the camera shake effect


float getCameraSensitive (  )

Returns the sensitivity of the lens movement

void setCameraSensitive (  float sensitive  )

Set the sensitivity of lens movement

void setCustomFog (  float start,  float end,  float density,  Vector3 color  )

Set custom fog

void setMainLightDir (  Vector3 dir  )

Set key light direction

void setMainLightColor (  Vector3 color  )

Set key light color

void setSubLightColor (  Vector3 color  )

Set sub light color

void setAmbientColor (  Vector3 color  )

Set the ambient light color

void setBrightness (  Vector3 color  )

Set color brightness

Vector3 getMainLightDir (  )

Get the direction of the main light

Vector3 getMainLightColor (  )

Get key light color

Vector3 getSubLightColor (  )

Get child light color

Vector3 getAmbientColor (  )

Get ambient light color

Vector3 getBrightness (  )

get color brightness

void setActorReceiveBlockLight (  boolean val  )

Sets whether the model receives light from glowing blocks

void setActorMainLightColor (  Vector3 color  )

Set character main light color

void setActorSubLightColor (  Vector3 color  )

Set character sub light color

void setActorAmbientColor (  Vector3 color  )

Sets the color of ambient light around the character

void setActorBrightness (  Vector3 color  )

Set character brightness

Vector3 getActorMainLightColor (  )

Get the character's main light color

Vector3 getActorSubLightColor (  )

Get character sub light color

Vector3 getActorAmbientColor (  )

Get character ambient light color

Vector3 getActorBrightness (  )

Get character brightness value

void setCurQualityLevel (  int level  )

Set game quality

void setEnableSpecular (  float _val  )

Sets the startup specular value

float getEnableSpecular (  )

Get the startup specular value

void setEnableBlockRender (  boolean _val  )

Set whether to render blocks

void setEnableActorRender (  boolean _val  )

Set whether to render the character

void setEnableEffectRender (  boolean _val  )

Set start effect rendering

void setWorldEffectVisualDistance (  float distance  )

Set the visible distance of the effect display

float getWorldEffectVisualDistance (  )

Returns the visible distance of the effect display

void clearSky (  )

clear skybox

void addSky (  string right,  string left,  string top,  string bottom,  string back,  string front,  float time,  float transition  )

add skybox

void setEnableAntiAliasing (  boolean _val  )

set enable antialiasing

boolean getEnableAntiAliasing (  )

Get antialiasing enabled

void setEnableBloom (  boolean _val  )

set enable bloom

boolean getEnableBloom (  )

get enabled floodlight

void setBloomThreshold (  float val  )

Set the bloom threshold

float getBloomThreshold (  )

Get the flood threshold

void setBloomSaturation (  float val  )

Set bloom saturation

float getBloomSaturation (  )

get flood saturation value

void setBloomDeviation (  float val  )

Sets the bias value for bloom

float getBloomDeviation (  )

Get the bloom bias value

void setBloomIntensity (  float val  )

Set flood intensity

float getBloomIntensity (  )

Get the bloom intensity value

void setEnableMotionBlur (  boolean _val  )

Set motion blur

boolean getEnableMotionBlur (  )

get motion blur

void setMotionBlurStrength (  float _val  )

Set the motion blur strength

float getMotionBlurStrength (  )

Get the intensity of the motion blur

void setEnableRadialBlur (  boolean _val  )

Set Enable Radial Blur

void setRadialBlurStrength (  float _val  )

Set radial blur strength

void loadCameraCfg (  cameraCfg config  )

Load camera configuration

void setPersonView (  int viewMode  )

Set personal perspective (0: first person, 1: third person, 2: frontal view)

void clearLight (  )

clear all lights

void addLight (  Vector3 mainLightDir,  Vector3 mainLightColor,  Vector3 subLightColor,  Vector3 ambientLightColor,  Vector3 brightness,  float time,  float transition  )

Add lights

void clearActorLight (  )

Clear character lights

void addActorLight (  Vector3 mainLightColor,  Vector3 subLightColor,  Vector3 ambientLightColor,  Vector3 brightness,  float time,  float transition  )

Add character lights

void beginMouseMove (  float x,  float y  )

Sets the starting position for user interaction with the device

void setMouseMoveState (  boolean bState  )

Set the state of the user's interaction and movement with the device

void endMouseMove (  float x,  float y  )

Sets the end position where the user ends the interaction with the device

void setMousePos (  float x,  float y,  boolean immd  )

Settings Set the location where the user interacts with the device

void clearMousePos (  )

Clear interaction location point history

void setLockViewPos (  boolean value  )

Set start lock view position

void setExtraCameraDistance (  float distance  )

Set the camera's extra distance based on the original distance

boolean isLockBodyRotation (  )

Determine whether to lock the player's body to rotate with the camera

void setLockBodyRotation (  boolean value  )

Set whether to lock the player's body to rotate with the camera

boolean isLockSlideScreen (  )

Determine whether to lock the sliding screen

void setLockSlideScreen (  boolean value  )

set startup lock swipe screen