timer
This commit is contained in:
parent
7233b1054e
commit
3140d6880e
File diff suppressed because one or more lines are too long
|
@ -620,6 +620,24 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 4aabce12c1341ff488ee4dc806fd80e8, type: 3}
|
m_Script: {fileID: 11500000, guid: 4aabce12c1341ff488ee4dc806fd80e8, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!1 &872164353 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 203935764274243221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4158834148864819266}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &872164355
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 872164353}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0e0dc4c0bfe6da44682256676d1ccef6, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
timerText: {fileID: 1785683341}
|
||||||
--- !u!4 &1194834060 stripped
|
--- !u!4 &1194834060 stripped
|
||||||
Transform:
|
Transform:
|
||||||
m_CorrespondingSourceObject: {fileID: 320690117028550720, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
m_CorrespondingSourceObject: {fileID: 320690117028550720, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
||||||
|
@ -2238,6 +2256,17 @@ Transform:
|
||||||
m_Children: []
|
m_Children: []
|
||||||
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!114 &1785683341 stripped
|
||||||
|
MonoBehaviour:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 5558345568148303310, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4158834148864819266}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &1872712129
|
--- !u!1 &1872712129
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -2366,6 +2395,10 @@ PrefabInstance:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
|
- target: {fileID: 2404937059918327841, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
- target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
propertyPath: rope
|
propertyPath: rope
|
||||||
value:
|
value:
|
||||||
|
@ -2469,7 +2502,10 @@ PrefabInstance:
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 203935764274243221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 872164355}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
--- !u!1001 &4910321061857220295
|
--- !u!1001 &4910321061857220295
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using TMPro;
|
||||||
|
|
||||||
|
public class SurvivalTimer : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] TextMeshProUGUI timerText;
|
||||||
|
float elapsedTime;
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
elapsedTime += Time.deltaTime;
|
||||||
|
int minutes = Mathf.FloorToInt(elapsedTime / 60);
|
||||||
|
int seconds = Mathf.FloorToInt(elapsedTime % 60);
|
||||||
|
timerText.text = string.Format("{00:00}:{01:00}", minutes, seconds);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0e0dc4c0bfe6da44682256676d1ccef6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue