ui
This commit is contained in:
8
Assets/Scripts/UI scripts.meta
Normal file
8
Assets/Scripts/UI scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f9964f63204e9542ba0533f5ec31d3f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
31
Assets/Scripts/UI scripts/GameUI.cs
Normal file
31
Assets/Scripts/UI scripts/GameUI.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using UnityEngine.UI;
|
||||
using JetBrains.Annotations;
|
||||
using Unity.Mathematics;
|
||||
|
||||
public class GameUI : MonoBehaviour
|
||||
{
|
||||
|
||||
public GameObject car;
|
||||
private float carVel;
|
||||
public Rigidbody carRB;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
if (carRB == null)
|
||||
{
|
||||
carRB = GetComponent<Rigidbody>();
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
carVel = (math.abs(carRB.velocity.x) + math.abs(carRB.velocity.y) + math.abs(carRB.velocity.z))*5;
|
||||
print(carVel);
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UI scripts/GameUI.cs.meta
Normal file
11
Assets/Scripts/UI scripts/GameUI.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e08eb46613e9c34dbc9e95c80e40143
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user