Cerebrum™
Loading...
Searching...
No Matches
Cerebrum.OMHChatBubble Class Reference
Inheritance diagram for Cerebrum.OMHChatBubble:
Collaboration diagram for Cerebrum.OMHChatBubble:

Public Types

enum  IconType { Happy , Neutral , Angry }
 

Public Member Functions

override bool HandleMessage (string msg, string param, out string retString)
 Handles messages sent to this game object from current MyGameManager.
 
- Public Member Functions inherited from Cerebrum.ObjectMessageHandlerBase
void SetItemText (string newText)
 Sets the text on UI.Text, TextMeshPero, or TextMeshProUGUI objects.
 
void OnPointerClick (PointerEventData pointerEventData)
 Detect current clicks on the GameObject (the one with the script attached)
 
void OnPointerEnter (PointerEventData pointerEventData)
 Detect if the Cursor starts to pass over the GameObject.
 
void OnPointerExit (PointerEventData pointerEventData)
 Detect when Cursor leaves the GameObject.
 
void OnMouseEnter ()
 
void OnMouseExit ()
 
virtual bool HandleMessage (MyGameManager MyGameManager_instance, string msg, string param, out string retString)
 Handles messages sent to this game object from passed in MyGameManager.
 
virtual bool HandleMessage (string msg, string param, out string retString)
 Handles messages sent to this game object from current MyGameManager.
 
Vector3 GetParamPosition (string param)
 Get position vector if param string is either a vector or a ame object name.
 
void GetEvaluatedParams (string param, out string[] parameters)
 
Vector3 getVector3 (string rString)
 Misc functions.
 
Vector3 getVector3 (string rString, out float duration)
 
void Pressed ()
 

Static Public Member Functions

static void Create (Transform parent, Vector3 localPosition, IconType iconType, string text)
 
- Static Public Member Functions inherited from Cerebrum.ObjectMessageHandlerBase
static string GetHumanBodyBoneName (HumanBodyBones rBoneID)
 Converts our Unity bone id into the name equivalent.
 
static void Align (Transform myTransform, Transform myChild, Transform target)
 
static bool DoesTagExist (string aTag)
 
static GameObject FindGO (string param)
 If present, use GameManager's functionality to find object. Otherwise use default Find()
 
static System.Type FindType (string typeName, bool useFullName=false, bool ignoreCase=false)
 Finds a compoenent by name, or returns NULL if not found. Slow first time called as it builds component list from asasemblies.
 

Public Attributes

Color bubbleColor1 = Color.blue
 
- Public Attributes inherited from Cerebrum.ObjectMessageHandlerBase
bool pressed = false
 mouse-over varaibles
 
bool hover = false
 
bool clickable = false
 
bool startTime
 timer variables
 
float timer = 0
 timer running if true
 
bool playSound
 Countdown timer for timer commmands (setTimer, startTimer, checkTimer )
 
float interval
 
float timertrack = 0
 
string inputText
 
float movementSpeed = 1f
 
Material outline_normal
 
Material outline_good
 
Material outline_yellow
 
Material outline_bad
 
AudioSource aSource
 
AudioClip clip
 
bool enableSelection = true
 
string itemTextString = null
 
GameObject itemTextGO
 
ExpressionParser ep
 
Texture2D cursorTexture2D
 
float jumpVelocity = 8.5f
 
float fallMult = 2.5f
 
float lowJumpMult = 2f
 
Vector3 gravity = new Vector3(0f, -10f, 0f)
 
Vector2 center = new Vector2(500,500)
 GUI Radial Menu Stuff.
 
int radius = 125
 
Texture centerButton
 
Texture answerButton
 
RectOffset rectOff
 
string question
 
string[] choices
 
float menuSizeFraction =0.55f
 
bool radialMenuActive = false
 
bool UIActiveReset = false
 
float anglePad = 20f
 

Static Public Attributes

static OMHChatBubble ChatBubblePrefab
 
- Static Public Attributes inherited from Cerebrum.ObjectMessageHandlerBase
static bool UIActive = false
 
static Dictionary< string, Type > Registrations = new Dictionary<string, Type>()
 Used to keep track of full component names in assembly for finding by type name.
 

Protected Member Functions

override void Awake ()
 whether object has animator with "Speed" parameter
 
override void Update ()
 
- Protected Member Functions inherited from Cerebrum.ObjectMessageHandlerBase
virtual void Start ()
 
void FindMyChildrenRecursive (List< Transform > list, Transform root)
 
Collider RaycastFirstCollider (Camera cam)
 Raycast the current mouse pointer on a given camera. Returns first collider hit by distance.
 
virtual void Awake ()
 whether object has animator with "Speed" parameter
 
string GetHumanBone (string bname)
 get human avatar bone by name, e.g. 'Jaw', 'RightLowerArm' and returns GameObject name
 
bool MenuCommand (string msg, string param)
 Menu commands and functions.
 
void LookAt (string param, bool upright=false)
 Camera Commands and functions.
 
void LookAtLegacy (string param, bool upright=false)
 LookAt an object from an optional offset or location.
 
virtual void Update ()
 

Additional Inherited Members

- Protected Attributes inherited from Cerebrum.ObjectMessageHandlerBase
string followTarget
 
Vector3 scale = new Vector3(5, 5, 5)
 
Vector3 pos = new Vector3(5, 5, 5)
 
Vector3 offset = new Vector3(0.0f,0.2f,-0.10f)
 
bool commandFound = false
 
Collider collider
 
Rigidbody rb
 
Animator animator
 
Renderer mr
 
List< Renderer > mrs
 
Outline outline =null
 
List< Outline > outlines
 
ChatBubble chatBubble =null
 
Color bubbleColor = Color.blue
 
String chatText
 
GameObject chatObject = null
 
GameObject player =null
 
MyGameManager gm
 

Member Enumeration Documentation

◆ IconType

Enumerator
Happy 
Neutral 
Angry 

Member Function Documentation

◆ Awake()

override void Cerebrum.OMHChatBubble.Awake ( )
protectedvirtual

whether object has animator with "Speed" parameter

Reimplemented from Cerebrum.ObjectMessageHandlerBase.

◆ Create()

static void Cerebrum.OMHChatBubble.Create ( Transform  parent,
Vector3  localPosition,
IconType  iconType,
string  text 
)
static

◆ HandleMessage()

override bool Cerebrum.OMHChatBubble.HandleMessage ( string  msg,
string  param,
out string  retString 
)
virtual

Handles messages sent to this game object from current MyGameManager.


Follow

follow AIM_OBJECT [TAGET_OBJECT | TARGET_OBJECT_TAG]

Follows the object TARGET_OBJECT or the object with tag TARGET_OBJECT_TAG.

Parameters
TARGET_OBJECTobect to move towards
TARGET_OBJECT_TAGtag of obect to move towards

Examples:

Player Follow Player
Player Follow $Nurse
Cart Follow MainCamera


SwitchToScene

SwitchToScene SCENE_NAME

Switches to SCENE_NAME parameter

Parameters
SCENE_NAMEscene to switch to

Examples:

SwitchToScene 'Level2'
SwitchToScene $level

Clickable objects and buttons

Clickable.resetPressed

ResetPressed

Clickable.ResetPressed

Resets clicked-on flag "pressed" to false

Examples:

$Patient Clickable.reset
$GXMForm reset

Clickable.reset

Reset

Clickable.Reset

Resets clicked-on flags "pressed" to false and "clickable" to true

Examples:

$Patient Clickable.reset
$GXMForm reset

Clickable.IsPressed

Pressed

Clickable.IsPressed

Checks whether object was clicked on (clicked-on flag "pressed" set)

Returns
whether object is pressed

Examples:

If
$Patient Clickable.IsPressed
Then
Do 'PatientCheck.txt'
Endif

Clickable

Selectable

Clickable.On [ true | false ]

Checks whether object was clicked on (clicked-on flag set)

Parameters
trueor 1 for on, false or 0 for off. Omitted parameter is on.

Examples:

$Patient Clickable.On true
$Patient Clickable.On $CanSelect
$Patient Clickable.On

Audio commands

MOVETO message sets camera position and rotation. moveto/align/orient targetObject [duration]

LOOKAT message sets camera position and rotation. lookAt targetObject offset lookAt targetObject viewerObject(for position) lookAt targetObject ("close", "medium", or "far"(using CameraTargetParams data))


Menu.on

Menu.question

Menu.choices

Menu.done

Menu.result

Menu.choice

Menu.on - turn object's menu on

Menu.question - set menu's question

Menu.choices CHOICE_STRINGS - set multiple-choice choices

Menu.done - true when choice has been made

Menu.result MATCH_STRING - bool containing whether choice matches MATCH_STRING

Menu.choice - string containing the choice that user made

Switches to SCENE_NAME parameter

Parameters
CHOICE_STRINGSchoices separated by space or comma. If choice has a space or commad, enclose in single quotes.
MATCH_STRINGstring exactly matching one of the choices

Examples:

ZoomSpot Menu.Choices 'Turn' 'Cancel' 'Put Back'
ZoomSpot Menu.Question 'Infusion Set'
ZoomSpot Menu.Choices 'Turn' 'Cancel' 'Put Back'
ZoomSpot Menu.on ZoomSpot
WaitFor
ZoomSpot Menu.Done
If
ZoomSpot Menu.Result 'Turn'
Then
Prompt 'Chose to turn it'

Reimplemented from Cerebrum.ObjectMessageHandlerBase.

◆ Update()

override void Cerebrum.OMHChatBubble.Update ( )
protectedvirtual

Reimplemented from Cerebrum.ObjectMessageHandlerBase.

Member Data Documentation

◆ bubbleColor1

Color Cerebrum.OMHChatBubble.bubbleColor1 = Color.blue

◆ ChatBubblePrefab

OMHChatBubble Cerebrum.OMHChatBubble.ChatBubblePrefab
static

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