Cookie Clicker in 60 sec | Unity Tutorial - playegndary.com

Cookie Clicker in 60 sec | Unity Tutorial

60 Seconds Code
Views: 2500
Like: 35
I hope I was able to help you with this video, if that’s the case, I would be very happy for a rating and a comment, thank you very much!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CookieClicker : MonoBehaviour
{
public Text cookieText;
public int cookies;

public void Start()
{
cookies = 0;
}

public void Clicker()
{
cookies++;
}

public void Update()
{
cookieText.text = “You have ” + cookies + ” Cookies”;
}
}

3 Comments

  1. // Here's the code for the lazy onesusing System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    using TMPro;

    public class Clicker : MonoBehaviour
    {
    public TextMeshProUGUI clicksText;
    public int clicks;

    // Start is called before the first frame update
    void Start()
    {
    clicks = 0;
    }

    public void ClickButton()
    {
    clicks++;
    }

    public void Update()
    {
    clicksText.text = "Clicks = " + clicks;
    }
    }

Leave a Reply

Your email address will not be published.