Skip to main content

ActionChain

This class is used when you want to run multiple actions in a row in Game Controling.


Methods ​

app_quit ​

public
Arguments ​

click ​

public

Add the action of clicking on the screen coordinates to the Action Chain.

Usage​
gamium.actions().click({ x: 0, y: 0 }).perform()
Arguments ​

drag ​

public

Adds an action to ActionChain that drags from one coordinate to another coordinate.

Usage​
gamium.actions().drag(Vector2(0, 0), Vector2(0, 10)).perform()
Arguments ​

move ​

public

Add the action of moving the mouse to a specific coordinate to the Action Chain.

Usage​
gamium.actions().move(Vector2(0, 0)).perform()
Arguments ​

move_player ​

public

Adds an action to the Action Chain that moves the Player to a specific position.

Usage​
gamium
.actions()
.move_player(
By.path('/PlayerSpawnPoint[1]/WizardCharacter(Clone)[1]'),
By.path('/Main Camera[1]'),
Vector3(0, 0, 0),
MovePlayerOptions(MovePlayerBy.Navigation),
)
.perform()
Arguments ​

perform ​

public

Request actions registered in the AccrtionChain to 'Gamium Engine'.

Return ​
  • List[ActionResultT]

scroll ​

public

Adds an action to ActionChain that scrolls by delta from a specific coordinate.

Usage​
gamium.actions().scroll(Vector2(0, 0), Vector2(0, 10)).perform()
Arguments ​

send_keys ​

public

Adds an action to ActionChain that causes specific keystrokes to occur.

Usage​
game
.actions()
.send_keys([KeyBy.unity_keycode('Space')])
.perform()
Arguments ​

set_text ​

public

Adds an action to ActionChain to enter text for a specific object.

Usage​
gamium
.actions()
.set_text(By.path('/Canvas[1]/Panel[1]/InputField[1]/Text[1]'), 'Hello World')
.perform()
Arguments ​

sleep ​

public

Add an empty time in the middle of the ActionChain.

Usage​
gamium.actions().sleep(300).set_text(text1, 'Hello World').perform()
Arguments ​