AI Testing Simulator
|
An abstract base class for a BaseEntity providing shared functionality for handling positions, rotations, and selections. More...
Public Member Functions | |||
virtual void | Awake () | ||
abstract Sprite | GetSprite () | ||
Returns the Sprite associated with the vehicle. | |||
Location | GetLocation () | ||
Gets the location of the vehicle. | |||
abstract void | Init (AdversaryCategory cat, Color color) | ||
Initializes the vehicle view controller with the specified category and color. | |||
virtual void | OnChangePosition (float x, float y) | ||
Changes the position of the entity to the given coordinates. | |||
virtual void | OnChangeRotation (float angle) | ||
Changes the rotation of the entity to the given angle. | |||
virtual void | OnChangeCategory (AdversaryCategory cat) | ||
Changes the category of the entity to the given category. | |||
void | OnChangeModel (EntityModel model) | ||
Changes the model of the entity to the given model. | |||
void | OnChangeID (string id) | ||
Changes the ID of the entity to the given ID. | |||
virtual void | Select () | ||
Selects the entity and changes its position and material. | |||
virtual void | Deselect () | ||
Deselects the entity and changes its position and material. | |||
abstract void | Destroy () | ||
Destroys the entity. | |||
Vector2 | GetPosition () | ||
Gets the position of the entity. | |||
void | Update () | ||
Updates the entity's position and rotation. | |||
void | OnMouseDrag () | ||
Handles the OnMouseDrag event to move the entity. | |||
void | OnMouseDown () | ||
Handles the OnMouseDown event to select and place the entity. | |||
bool | IsIgnoringWaypoints () | ||
Returns whether the entity should ignore waypoints. | |||
virtual void | ShouldIgnoreWaypoints (bool b) | ||
Sets whether the entity should ignore waypoints. | |||
abstract BaseEntity | GetEntity () | ||
Gets the BaseEntity instance of the entity. | |||
abstract void | OpenEditDialog () | ||
Opens the edit dialog for the entity. | |||
abstract void | OnChangeColor (Color c) | ||
Changes the color of the entity. | |||
BaseEntity | GetEntity () | ||
Returns the entity associated with the controller. This can be Ego or Adversary. | |||
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 | OnChangeCategory (AdversaryCategory cat) | ||
Called when the category of the entity changes. </summary
| |||
void | OnChangeModel (EntityModel model) | ||
Called when the model of the entity changes. | |||
void | OnChangeID (string id) | ||
Called when the ID of the entity changes. | |||
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. | |||
Public Attributes | |
Material | selectionMaterial |
Protected Member Functions | |
abstract void | RegisterEntity () |
Registers the entity with the main controller. | |
Protected Attributes | |
SpriteRenderer | sprite |
bool | placed = false |
Vector2 | difference = Vector2.zero |
Vector2 | lastClickPos = Vector2.zero |
SnapController | snapController |
MainController | mainController |
bool | ignoreWaypoints |
An abstract base class for a BaseEntity providing shared functionality for handling positions, rotations, and selections.
|
inlinevirtual |
Deselects the entity and changes its position and material.
Implements IBaseController.
Reimplemented in AdversaryViewController, and EgoViewController.
|
pure virtual |
Destroys the entity.
Implements IBaseController.
Implemented in AdversaryViewController, and EgoViewController.
|
pure virtual |
Gets the BaseEntity instance of the entity.
Implements IBaseEntityController.
Implemented in AdversaryViewController, and EgoViewController.
|
inline |
Gets the location of the vehicle.
Implements IBaseController.
|
inline |
Gets the position of the entity.
|
pure virtual |
Returns the Sprite associated with the vehicle.
Implemented in AdversaryViewController, and EgoViewController.
|
pure virtual |
Initializes the vehicle view controller with the specified category and color.
cat | The AdversaryCategory to initialize the vehicle with. |
color | The Color to initialize the vehicle with. |
Implemented in AdversaryViewController, and EgoViewController.
|
inline |
Returns whether the entity should ignore waypoints.
Implements IBaseController.
|
inlinevirtual |
Changes the category of the entity to the given category.
cat | The new AdversaryCategory of the entity. |
Implements IBaseEntityView.
Reimplemented in AdversaryViewController, and EgoViewController.
|
pure virtual |
Changes the color of the entity.
c | The new color of the entity. |
Implements IBaseView.
Implemented in AdversaryViewController, and EgoViewController.
|
inline |
Changes the ID of the entity to the given ID.
id | The new ID of the entity. |
Implements IBaseEntityView.
|
inline |
Changes the model of the entity to the given model.
model | The new EntityModel of the entity. |
Implements IBaseEntityView.
|
inlinevirtual |
Changes the position of the entity to the given coordinates.
x | The X coordinate of the new position. |
y | The Y coordinate of the new position. |
Implements IBaseView.
Reimplemented in AdversaryViewController.
|
inlinevirtual |
Changes the rotation of the entity to the given angle.
angle | The new angle in degrees. |
Implements IBaseView.
|
pure virtual |
Opens the edit dialog for the entity.
Implements IBaseController.
Implemented in AdversaryViewController, and EgoViewController.
|
protectedpure virtual |
Registers the entity with the main controller.
Implemented in AdversaryViewController, and EgoViewController.
|
inlinevirtual |
Selects the entity and changes its position and material.
Implements IBaseController.
Reimplemented in AdversaryViewController, and EgoViewController.
|
inlinevirtual |
Sets whether the entity should ignore waypoints.
b | True to ignore waypoints, false otherwise. |
Implements IBaseController.
Reimplemented in AdversaryViewController.