Tanoda
LinearSpeedTextBehaviour.cs
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) Ultraleap, Inc. 2011-2020. *
3
* *
4
* Use subject to the terms of the Apache License 2.0 available at *
5
* http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6
* between Ultraleap and you, your company or other organization. *
7
******************************************************************************/
8
9
using
UnityEngine
;
10
11
namespace
Leap.Unity.Examples
{
12
13
[AddComponentMenu(
""
)]
14
public
class
LinearSpeedTextBehaviour
: MonoBehaviour {
15
16
public
TextMesh
textMesh
;
17
18
public
Spaceship
ship
;
19
20
public
string
linearSpeedPrefixText
;
21
22
public
string
linearSpeedPostfixText
;
23
24
void
Update() {
25
textMesh
.text =
linearSpeedPrefixText
+
ship
.
shipAlignedVelocity
.magnitude.ToString(
"G3"
) +
linearSpeedPostfixText
;
26
}
27
}
28
}
Leap.Unity.Examples.LinearSpeedTextBehaviour
Definition:
LinearSpeedTextBehaviour.cs:14
Leap.Unity.Examples.LinearSpeedTextBehaviour.textMesh
TextMesh textMesh
Definition:
LinearSpeedTextBehaviour.cs:16
Leap.Unity.Examples.LinearSpeedTextBehaviour.linearSpeedPrefixText
string linearSpeedPrefixText
Definition:
LinearSpeedTextBehaviour.cs:20
Leap.Unity.Examples.LinearSpeedTextBehaviour.ship
Spaceship ship
Definition:
LinearSpeedTextBehaviour.cs:18
Leap.Unity.Examples.LinearSpeedTextBehaviour.linearSpeedPostfixText
string linearSpeedPostfixText
Definition:
LinearSpeedTextBehaviour.cs:22
Leap.Unity.Examples.Spaceship
The spaceship in this example is a kinematic rigidbody with a force API, but having a rigidbody on yo...
Definition:
Spaceship.cs:33
Leap.Unity.Examples.Spaceship.shipAlignedVelocity
Vector3 shipAlignedVelocity
Definition:
Spaceship.cs:57
Leap.Unity.Examples
Definition:
InertiaPostProcessProvider.cs:12
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Modules
InteractionEngine
Examples
7. Moving Reference Frames
Scripts
LinearSpeedTextBehaviour.cs
Generated by
1.9.3