UnityMol
0.9.6-875
UnityMol viewer / In developement
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
TestPlotter.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
System
.Collections;
3
4
public
class
TestPlotter
: MonoBehaviour {
5
6
// Use this for initialization
7
void
Start
() {
8
9
// Create a new graph named "MouseX", with a range of 0 to 2000, colour green at position 100,100
10
PlotManager
.
Instance
.
PlotCreate
(
"MouseX"
, 0, 2000, Color.green,
new
Vector2(100,100));
11
12
// Create a new child "MouseY" graph. Colour is red and parent is "MouseX"
13
PlotManager
.
Instance
.
PlotCreate
(
"MouseY"
, Color.red,
"MouseX"
);
14
}
15
16
// Update is called once per frame
17
void
Update
() {
18
19
// Add data to graphs
20
PlotManager
.
Instance
.
PlotAdd
(
"MouseX"
, Input.mousePosition.x);
21
PlotManager
.
Instance
.
PlotAdd
(
"MouseY"
, Input.mousePosition.y);
22
}
23
24
25
}
PlotManager
Definition:
PlotManager.cs:6
PlotManager.PlotAdd
void PlotAdd(String plotName, float value)
Add a value to plot graph
Definition:
PlotManager.cs:53
PlotManager.PlotCreate
void PlotCreate(String plotName, float min, float max, Color plotColor, Vector2 pos)
Instantiate a new new plot graph
Definition:
PlotManager.cs:64
System
PlotManager.Instance
static PlotManager Instance
Instance of object
Definition:
PlotManager.cs:18
UnityEngine
TestPlotter.Start
void Start()
Definition:
TestPlotter.cs:7
TestPlotter
Definition:
TestPlotter.cs:4
TestPlotter.Update
void Update()
Definition:
TestPlotter.cs:17
Assets
Plotter
Test
TestPlotter.cs
Generated on Wed Aug 3 2016 15:10:26 for UnityMol by
1.8.11