hello people,
i tried to make a script with a timer in it. this is what i got so far:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class timerscript : MonoBehaviour
{
AsyncOperation ao;
public GameObject controller;
public GameObject arrow;
public Text textcontinue;
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if(timeLimit > 1)
{
timeLimit -= Time.deltaTime;
GetComponent(GameObject.controller) = true;
GetComponent(GameObject.arrow) = true;
GetComponent(Text.textcontinue) = true;
}
}
}
what the result has to be: 3 components in my scene which are disabled by default, should switch to enabled in a timer script.
im not good at scripting so i hope someone can solve this for me.