Skip to content
Dimaspadma edited this page Sep 18, 2023 · 1 revision

Robot

Frame 1 (8)

Description

This class contains methods for controlling the robot.

Properties

Parameter Description
healthPoint Robot's health.
staminaPoint Robot's stamina
_startPosition Robot position when the game started.
_teamController Controlling the team robot.
_robotMovement Movements of the robot.
_robotAttack Attacks from robot.
Robot Identity of the robot such as name, health, stamina.
GridController Get the grid.

Public Method

Name Description
Awake Get the robot movement, robot attack, and start position.
Update Update the robot's health and stamina, check if the robot is dead then the robot is destroyed.
SetTeam Set the team controller.
MovePosition Get the robot's new position when robot is move.
MoveRobotPosition Calculate distance to move, the robot can move in the intended direction.
MoveWithDoTween Move to position with some transition.
ResetPosition Reset the robot position to the start position.
Clone this wiki locally