Gravity Engine 12.0
Unity Asset for Gravity
Loading...
Searching...
No Matches
GEGraph Class Reference

Utility singleton to allow scripts to update a quantity and see it displayed as a line graph via a secondary camera. More...

Inheritance diagram for GEGraph:

Classes

class  GraphLine
 

Public Member Functions

int NewGraphLine (Color color, double scale, double offset)
 Define a new graph line.
 
void SetValue (int index, double value)
 

Static Public Member Functions

static GEGraph Instance ()
 Singleton indexer. (Eventually want to generalize to more than one, perhaps with tags to identify them)
 

Public Attributes

GameObject trailPrefab
 
float timeScale = 1.0f
 

Detailed Description

Utility singleton to allow scripts to update a quantity and see it displayed as a line graph via a secondary camera.

Trail prefab needs to be a game object with a trail renderer attached.

This object moves in the +x direction as time goes on. It is assumed there is a Camera as a child of this object to create a "strip chart" like behaviour. Typically this camera will have a new view window.

Concept: This object will move in +x as time goes on, and the camera as a child will follow along. Each graph line will move up and down based on the latest value. A trail renderer on the trailPrefab will leave a strip-chart like line behind.

Member Function Documentation

◆ Instance()

static GEGraph GEGraph.Instance ( )
static

Singleton indexer. (Eventually want to generalize to more than one, perhaps with tags to identify them)

Returns

◆ NewGraphLine()

int GEGraph.NewGraphLine ( Color  color,
double  scale,
double  offset 
)

Define a new graph line.

Parameters
color
Returns

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