ui?
This commit is contained in:
@@ -82,7 +82,6 @@ Transform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 2089599405993210120}
|
- {fileID: 2089599405993210120}
|
||||||
- {fileID: 6910657865482355608}
|
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1001 &517737349064952996
|
--- !u!1001 &517737349064952996
|
||||||
@@ -1249,80 +1248,6 @@ Transform:
|
|||||||
m_CorrespondingSourceObject: {fileID: 1279437348525638701, guid: e2e682b966e3f644392ffbfab511e0e2, type: 3}
|
m_CorrespondingSourceObject: {fileID: 1279437348525638701, guid: e2e682b966e3f644392ffbfab511e0e2, type: 3}
|
||||||
m_PrefabInstance: {fileID: 6134520914307201963}
|
m_PrefabInstance: {fileID: 6134520914307201963}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &6914808702520983802
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransformParent: {fileID: 4410338557763827223}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 1685004736896436, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: EA03_Prop_Pier_03d_PRE
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalScale.x
|
|
||||||
value: 2
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalScale.y
|
|
||||||
value: 2
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalScale.z
|
|
||||||
value: 2
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: -66.6138
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: -17.81
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 18.163359
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 0.3226137
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: 0.9465307
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 142.358
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_RemovedGameObjects: []
|
|
||||||
m_AddedGameObjects: []
|
|
||||||
m_AddedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
--- !u!4 &6910657865482355608 stripped
|
|
||||||
Transform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 4999849139159906, guid: 8d0bec0dc9ff9204bb3391cc6cb2c885, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 6914808702520983802}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1001 &7665355901869235984
|
--- !u!1001 &7665355901869235984
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -496,6 +496,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1429604867}
|
- {fileID: 1429604867}
|
||||||
|
- {fileID: 1303067121}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
@@ -728,12 +729,12 @@ Transform:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1303067118}
|
m_GameObject: {fileID: 1303067118}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: -960, y: -540, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 1032240017}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &1303067122
|
--- !u!114 &1303067122
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@@ -749,6 +750,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
car: {fileID: 86731284}
|
car: {fileID: 86731284}
|
||||||
carRB: {fileID: 86731289}
|
carRB: {fileID: 86731289}
|
||||||
|
speedometer: {fileID: 0}
|
||||||
--- !u!1 &1429604866
|
--- !u!1 &1429604866
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -774,7 +776,7 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1429604866}
|
m_GameObject: {fileID: 1429604866}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
@@ -806,7 +808,7 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text:
|
m_text: L
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
@@ -1170,7 +1172,6 @@ SceneRoots:
|
|||||||
- {fileID: 8222889276702183714}
|
- {fileID: 8222889276702183714}
|
||||||
- {fileID: 2034582631126909176}
|
- {fileID: 2034582631126909176}
|
||||||
- {fileID: 1032240017}
|
- {fileID: 1032240017}
|
||||||
- {fileID: 1303067121}
|
|
||||||
- {fileID: 437868554}
|
- {fileID: 437868554}
|
||||||
- {fileID: 467812079}
|
- {fileID: 467812079}
|
||||||
- {fileID: 1239887511}
|
- {fileID: 1239887511}
|
||||||
|
|||||||
@@ -12,9 +12,15 @@ public class GameUI : MonoBehaviour
|
|||||||
public GameObject car;
|
public GameObject car;
|
||||||
private float carVel;
|
private float carVel;
|
||||||
public Rigidbody carRB;
|
public Rigidbody carRB;
|
||||||
|
|
||||||
|
public TextMeshPro speedometer;
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
if (speedometer == null)
|
||||||
|
{
|
||||||
|
speedometer = new TextMeshPro();
|
||||||
|
}
|
||||||
if (carRB == null)
|
if (carRB == null)
|
||||||
{
|
{
|
||||||
carRB = GetComponent<Rigidbody>();
|
carRB = GetComponent<Rigidbody>();
|
||||||
@@ -25,7 +31,7 @@ public class GameUI : MonoBehaviour
|
|||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
carVel = (math.abs(carRB.velocity.x) + math.abs(carRB.velocity.y) + math.abs(carRB.velocity.z))*5;
|
carVel = (math.abs(carRB.velocity.x) + math.abs(carRB.velocity.y) + math.abs(carRB.velocity.z))*5;
|
||||||
print(carVel);
|
//print(carVel);
|
||||||
|
speedometer.SetText(carVel.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user