AI Testing Simulator
Loading...
Searching...
No Matches
WaypointViewController Class Reference

The WaypointViewController class handles the behavior of a waypoint in the game. </summary. More...

Inheritance diagram for WaypointViewController:
IBaseController IBaseView

Public Member Functions

void Init (Waypoint waypoint, PathController pathController, Color color, bool secondary)
 Initializes the Waypoint controller with the specified parameters.
 
void SetPathController (PathController pathController)
 Sets the PathController for the WaypointViewController.
 
PathController GetPathController ()
 Gets the PathController for the WaypointViewController.
 
void MakeSecondary ()
 Makes the waypoint a secondary waypoint.
 
bool IsSecondary ()
 Returns whether the waypoint is a secondary waypoint.
 
void OpenEditDialog ()
 Opens the edit dialog for the waypoint.
 
void SetColor (Color color)
 Sets the color of the waypoint.
 
void OnMouseDown ()
 Handles the OnMouseDown event to select the waypoint.
 
void OnMouseDrag ()
 Handles the OnMouseDrag event to move the waypoint.
 
void Select ()
 Selects the waypoint and scales it up to make it distinctly visible.
 
void Deselect ()
 Deselects the waypoint and scales it down again.
 
void Destroy ()
 Removes the waypoint from its path and destroys the game object.
 
void OnChangePosition (float x, float y)
 Changes the position of the waypoint GameObject.
 
void OnChangeRotation (float angle)
 Gets Called when Rotation is Changed (Not implemented for Waypoint)
 
void OnChangeColor (Color color)
 Gets called when Color is Changed.
 
bool IsIgnoringWaypoints ()
 Returns whether the waypoint is ignoring waypoint indicators.
 
void ShouldIgnoreWaypoints (bool b)
 Sets whether the waypoint should ignore waypoint indicators.
 
Location GetLocation ()
 Returns the location of the waypoint.
 
void Select ()
 Selects the controller.
 
void Deselect ()
 Deselects the controller.
 
void Destroy ()
 Destroys the controller.
 
void OpenEditDialog ()
 Opens the edit dialog for the controller.
 
bool IsIgnoringWaypoints ()
 Returns a boolean indicating whether or not the controller ignores waypoints.
 
void ShouldIgnoreWaypoints (bool b)
 Sets the value indicating whether or not the controller should ignore waypoints.
 
Location GetLocation ()
 Returns the location of the object that the controller belongs to.
 
void OnChangePosition (float x, float y)
 Called when the position of the corresponding object changes.
 
void OnChangeRotation (float angle)
 Called when the rotation of the corresponding object changes.
 
void OnChangeColor (Color color)
 Called when the color of the corresponding object changes.
 

Properties

Waypoint Waypoint [get, set]
 

Detailed Description

The WaypointViewController class handles the behavior of a waypoint in the game. </summary.

Member Function Documentation

◆ Deselect()

void WaypointViewController.Deselect ( )
inline

Deselects the waypoint and scales it down again.

Parameters
pathDeselectedIf set to true, also deselects the waypoint's path.

Implements IBaseController.

◆ Destroy()

void WaypointViewController.Destroy ( )
inline

Removes the waypoint from its path and destroys the game object.

Implements IBaseController.

◆ GetLocation()

Location WaypointViewController.GetLocation ( )
inline

Returns the location of the waypoint.

Returns
The location of the waypoint.

Implements IBaseController.

◆ GetPathController()

PathController WaypointViewController.GetPathController ( )
inline

◆ Init()

void WaypointViewController.Init ( Waypoint  waypoint,
PathController  pathController,
Color  color,
bool  secondary 
)
inline

Initializes the Waypoint controller with the specified parameters.

Parameters
waypointThe waypoint associated with this controller.
pathControllerThe controller of the Path that this waypoint is part of.
colorThe color for this waypoint.
pathControllerIndicates wether this waypoint should be secondary.

◆ IsIgnoringWaypoints()

bool WaypointViewController.IsIgnoringWaypoints ( )
inline

Returns whether the waypoint is ignoring waypoint indicators.

Returns
True if the waypoint should ignore waypoint indicators, false otherwise.

Implements IBaseController.

◆ IsSecondary()

bool WaypointViewController.IsSecondary ( )
inline

Returns whether the waypoint is a secondary waypoint.

Returns
True if the waypoint entity is a secondary waypoint, false otherwise.

◆ OnChangeColor()

void WaypointViewController.OnChangeColor ( Color  color)
inline

Gets called when Color is Changed.

Parameters
c

Implements IBaseView.

◆ OnChangePosition()

void WaypointViewController.OnChangePosition ( float  x,
float  y 
)
inline

Changes the position of the waypoint GameObject.

Parameters
xThe new x-coordinate.
yThe new y-coordinate.

Implements IBaseView.

◆ OnChangeRotation()

void WaypointViewController.OnChangeRotation ( float  angle)
inline

Gets Called when Rotation is Changed (Not implemented for Waypoint)

Parameters
angle

Implements IBaseView.

◆ OpenEditDialog()

void WaypointViewController.OpenEditDialog ( )
inline

Opens the edit dialog for the waypoint.

Implements IBaseController.

◆ Select()

void WaypointViewController.Select ( )
inline

Selects the waypoint and scales it up to make it distinctly visible.

Parameters
pathSelectedIf set to true, also selects the waypoint's path.

Implements IBaseController.

◆ SetColor()

void WaypointViewController.SetColor ( Color  color)
inline

Sets the color of the waypoint.

Parameters
colorThe new color for the waypoint entity.

◆ SetPathController()

void WaypointViewController.SetPathController ( PathController  pathController)
inline

Sets the PathController for the WaypointViewController.

Parameters
pathControllerThe PathController to set.

◆ ShouldIgnoreWaypoints()

void WaypointViewController.ShouldIgnoreWaypoints ( bool  b)
inline

Sets whether the waypoint should ignore waypoint indicators.

Parameters
ignoreTrue to ignore waypoint indicators, false to not ignore them.

Implements IBaseController.


The documentation for this class was generated from the following file: