3DSelfie
Hansjoerg Hofer (1026632), Sebastian Metzler (0927550)
Main Page
Classes
Files
File List
toggleResult.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
System
.Collections;
3
4
public
class
toggleResult
: MonoBehaviour {
5
6
Renderer snakeScript;
7
ControlPoints
controlpoints;
8
15
void
Start () {
16
17
snakeScript = GameObject.Find (
"SnakeScript"
).GetComponent<Renderer>();
18
controlpoints = GameObject.Find (
"Head_mesh"
).GetComponent<
ControlPoints
>();
19
20
}
21
22
bool
showSnake =
true
;
23
30
void
Update () {
31
32
if
(Input.GetKeyDown (
"z"
)) {
33
showSnake = !showSnake;
34
35
snakeScript.enabled = showSnake;
36
controlpoints.
EnableRotation
= !showSnake;
37
}
38
}
39
40
}
ControlPoints
ControlPoints script on mesh.
Definition:
ControlPoints.cs:10
System
ControlPoints.EnableRotation
bool EnableRotation
Definition:
ControlPoints.cs:186
toggleResult
Definition:
toggleResult.cs:4
UnityEngine
Assets
Scripts
toggleResult.cs
Generated on Tue Jun 9 2015 23:14:09 for 3DSelfie by
1.8.9.1