Overview
Arena objects
Arena objects are game objects with implemented functions for positionings, rotations etc. Arena objects come with Arena object manager as well, which allows grouping of controllers of the same type and doing madifications groupwise (such as setting same height or colour). Specific implementations of arena object is the Goal object (Goal controllerand Goal manager) and mark object (Mark controllerand Mark manager), see those sections for info.
Arena object controller
Arena obejct (AO) controller shoudl consist of a single empty game object with only controller script attached. It has PossibleObjects
and ActiveObject
parameters which are usually children obejcts, that AO can change "into". When creating an AO object, don't forget to add it's child object as well. Arena object shoudl have all colliders and mesh renderers in child objects, not on the same object where is the controller script.
Variables
Variable |
Purpose |
ActiveObject |
active game object if any |
PossibleObjects |
Contains an array of possible nested gameobjects to be played with with SetType . Can be set in unity |
Position |
Vector3 position in world coordinates |
Functions
Function |
Purpose |
Show |
Shows the object and enables all non trigger collider. |
Hide |
If the ocject is visible, it becomes invisible |
SetRotation |
Sets the obejct rotation with the Quaternion. |
StartRotation |
Starts rotating the object in a given vector. |
StopRotation |
If the object is rotating, stops the rotation. |
SetSize |
Sets the scale according to passed vector. |
SetColor |
Sets the colour of the main material of the object. Saves the previous colour so you can call ResetColor() |
ResetColor |
resets the color to the original one. |
SetType |
Sets the object to the one desired, based on its string name. |
Switch |
Switches betwen visible and invisible state and returns the current state. |
Arena object manager
Arena object manager allows to manage and controll all assigned controllers of a given type. Common practice is to have a single manager for each type of object that you have in scene.
By defualt, Arena object manager is a singleton, so you can't have multiple in the same scene. If you need more, you can override the base class or create multiple child classes of distinct names out of the single implementation of a single manager (eg. Start manager can have two children, Star1Manager and Start2Manager which inherit from the a base class)
Variables
Variable |
Purpose |
Objects |
Generic list of all the obejct of the fiven type that manager holds. |
Functions
Function |
Purpose |
ShowAll |
Shows the object and enables all non trigger collider. |
HideAll |
If the ocject is visible, it becomes invisible |
SetColor |
Sets the colour of all assigned objects. |
ResetColor |
resets the color to the original one. |
SetType |
Sets all assigned objects to the one desired, based on its string name. |
Goal Object
Goal object adds some additional functionality to the arena object by adding event functionality. It inherits all the functionality from the Arena Object and Arena object Controller.
Goal controller
Goal controller (GC) extends Arena object controller but adds goal/target specific functinoality
Variables
Variable |
Purpose |
GoalName |
Holds the name of goal object. |
PlayerInside |
Holds the bool value of if player is inside the goal or not. |
Events
Events |
Purpose |
OnEnter |
Is sent when player enters the goal object. |
OnExit |
Is sent when player exits the goal object. |
Goal manager
Goal manager extend Arena object manager. It is a singleton that is used to manage and controll all referenced Goal Controllers.
Variables
Experiment manager
Experiemnt manager is reponsible for loading expeirment from the data and manipulating expeirment states.
Functions
Player controllers
PLayer controllers build upon the player controller and IPlayerController
class to proovide bothe control as well as loggin informiaton necessary for conprehensive logs across differnet modalities of play (PC. VR, mobile etc.). Some functiuon needs to be implemented in order ot create sa new player log.
Variables
Functions
Rigidbody player controller
Beeper
Beepers are designed to simply play sounds when certain events happen within the game. Beeper objects have beeper manager and beeper controlers.
Beeper Manager
BeeperManager takes care of cntrolling all attached controllers and plays souds based on string designation
Variables
Function
Function |
Function |
Play |
Plays one shot of the sounds in the controller |
Data holders
Settings holder
Console manager