mirror of
https://github.com/DerTyp7/fps-citybuild-unity.git
synced 2025-10-30 12:37:08 +01:00
basic time system, test terrain, event log
This commit is contained in:
31
Assets/Scripts/EventScript.cs
Normal file
31
Assets/Scripts/EventScript.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class EventScript : MonoBehaviour
|
||||
{
|
||||
//[SerializeField] private Text text;
|
||||
void Start()
|
||||
{
|
||||
|
||||
Invoke("Delete", 5f);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void ChangeText(string msg)
|
||||
{
|
||||
Text t = GetComponentInChildren<Text>();
|
||||
t.text = msg;
|
||||
}
|
||||
|
||||
void Delete()
|
||||
{
|
||||
Destroy(this.gameObject);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user