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
position
Vector2
options
ActionClickOptions
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
from_position
Vector2
to_position
Vector2
options
ActionDragOptions
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
position
Vector2
options
ActionMoveOptions
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
player_locator
Locator
camera_locator
Locator
dest
Vector3
options
MovePlayerOptions
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
position
Vector2
delta
Vector2
options
ActionScrollOptions
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
options
SendKeyOptions
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
locator
Locator
text
str
options
SetTextOptions
sleep
public
Add an empty time in the middle of the ActionChain.
Usage
gamium.actions().sleep(300).set_text(text1, 'Hello World').perform()
Arguments
- ms
int