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

MainController manages the user interface and the interactions with the scenario editor. More...

Inheritance diagram for MainController:

Public Member Functions

void Update ()
 Updates the MainController and handles user input.
 
void SetSelectedEntity (IBaseController controller)
 Sets the selected entity in the scenario editor.
 
void MoveActionButtons (Vector2 pos)
 Moves the action buttons to the specified position.
 
void AddAdversary (Adversary adversary)
 Adds an adversary to the scenario.
 
void RemoveAdversary (Adversary adversary)
 Removes an adversary from the scenario.
 
void SetEgo (Ego ego)
 Sets the ego vehicle in the scenario.
 
void CreateAdversary (AdversaryCategory category)
 Creates a new adversary object without adding it to the scenario model. It will be added to the model once it is placed by the user.
 
void RefreshEntityList ()
 Refreshes the Entity list.
 

Static Public Member Functions

static void MoveToolTip (Vector2 pos, Vector2 direction, String text)
 
static void HideToolTip ()
 

Public Attributes

VisualTreeAsset eventEntryTemplate
 
GameObject vehiclePrefab
 
GameObject egoPrefab
 
GameObject pedPrefab
 
UISkin skin
 
WarningPopupController warningPopupController
 
YesNoPopupController yesNoPopupController
 
HelpPopupController helpPopupController
 

Static Public Attributes

static bool[] helpComplete = new bool[] { false, false }
 
static bool freeze = false
 

Properties

ScenarioInfo Info [get]
 The ScenarioInfo for the current scenario being edited.
 

Detailed Description

MainController manages the user interface and the interactions with the scenario editor.

Member Function Documentation

◆ AddAdversary()

void MainController.AddAdversary ( Adversary  adversary)
inline

Adds an adversary to the scenario.

Parameters
entityThe Adversary object to be added.

◆ CreateAdversary()

void MainController.CreateAdversary ( AdversaryCategory  category)
inline

Creates a new adversary object without adding it to the scenario model. It will be added to the model once it is placed by the user.

Parameters
categoryThe AdversaryCategory for the new adversary.

◆ MoveActionButtons()

void MainController.MoveActionButtons ( Vector2  pos)
inline

Moves the action buttons to the specified position.

Parameters
posA Vector2 representing the new position for the action buttons.

◆ RemoveAdversary()

void MainController.RemoveAdversary ( Adversary  adversary)
inline

Removes an adversary from the scenario.

Parameters
adversaryThe Adversary object to be removed.

◆ SetEgo()

void MainController.SetEgo ( Ego  ego)
inline

Sets the ego vehicle in the scenario.

Parameters
egoThe Ego object representing the ego vehicle.

◆ SetSelectedEntity()

void MainController.SetSelectedEntity ( IBaseController  controller)
inline

Sets the selected entity in the scenario editor.

Parameters
controllerThe entity to set as the selected entity. Pass null to deselect the current entity.</param

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