using System.Collections; using System.Collections.Generic; using UnityEngine; /* -------------------------------------- Project: Programing assessment Standard: 91906 (AS3.7) v.1 School: Tauranga Boys' College Author: Rauputu Noah Phizacklea Date: August 2024 Unity: 2021.3.18f --------------------------------------- */ public class FloatingText : MonoBehaviour { public float destroyTime = 3f; // Time in seconds before the floating text is destroyed void Start() { // Schedule the destruction of the floating text game object after destroyTime seconds Destroy(gameObject, destroyTime); } }