It's UI:
Download the game from here : Countgame
Script
For menu controller:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class menucontroller : MonoBehaviour
{
public void endgame()
{
Application.Quit();
}
}
Make sure the script name is same as you are making
For game controller:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class gamecontroller : MonoBehaviour
{
public Text counttext;
float i=0;
void Start()
{
i=0;
}
public void count()
{
i++;
counttext.text=i.ToString();
}
}
Make sure the script name is same as you are making
No comments:
Post a Comment