September 20, 2022



Blockman is a general class, which mainly sets and processes the attributes and data information of the player entity.


Player player

player entity

GameSettings gameSettings

Game settings example


Blockman Instance (  )

Get a singleton instance of Blockman

table getUserAction (  )

Get the behavior information of the player's operation

table getHitInfo (  )

Get the details of the object pointed to by the player's action

void switchPersonView (  )

Switch the player's personal perspective

void setCanSwitchView (  boolean enable  )

Set whether to allow switching of personal perspective

void setPersonView (  int view  )

Set the player's personal perspective

int getPersonView (  )

Get the player's perspective

PlayerControl control (  )

Returns the player controller instance

void setViewEntity (  Entity entity  )

Set the entity object observed by the client

Entity viewEntity (  )

Returns the entity object observed by the client

void changeCameraView (  Vector3 pos,  float yaw,  float pitch,  float distance,  float smooth  )

Change the camera's angle of view

void changeCameraCfg (  cameraCfg config,  int modeViewIndex  )

Change the camera's configuration

cameraCfg getCameraInfo (  int viewIndex  )

Get the camera's perspective view information

table getScreenPos (  Vector3 position  )

Convert world coordinates to screen coordinates

table getScreenSize (  )

get screen size

Vector2 getClickPos (  )

Get the point where the user interacts with the device

Vector2 toScreenClickPos (  Vector2 pos  )

Convert the specified coordinates to screen coordinates

void playEffectByPos (  string templateName,  Vector3 position,  float yaw,  int duration,  Vector3 scale  )

Play an effect at a location

void addBetweenEffect (  string templateName,  Vector3 position,  Vector3 endPos,  int duration  )

Add between two points effect

void delEffect (  string templateName,  Vector3 position  )

delete effect

void trajectoryEffect (  string templateName,  Vector3 position,  float pitch,  float yaw,  float roll,  int duration,  string extendName  )

special effects track

float getViewerYaw  (  )

Get camera rotation yaw

Vector3 getViewerPos  (  )

Get camera position