Azarian

Find 10 Differences

by Azarian

Find 10 Differences Unity

Screenshots

Find 10 Differences Unity
Find 10 Differences Unity

Specification

How to Use

Sample Code

using UnityEngine; using System.Collections; public class LevelSelect : MonoBehaviour { public SpriteRenderer stars; public Sprite[] starsSprite; void Start () { int temp = PlayerPrefs.GetInt("Level" + gameObject.name, -1); if (temp != -1 || gameObject.name == "1") { if (temp == -1) { temp = 0; } GetComponent<Collider2D>().enabled = true; GetComponent<SpriteRenderer>().enabled = false; stars.sprite = starsSprite[temp]; } else if (temp == -1) { GetComponent<Collider2D>().enabled = false; stars.sprite = starsSprite[0]; } } void OnMouseDown() { Application.LoadLevel(gameObject.name); } }

Video

Comments (0)

  • {{com.username}}
    {{com.username}}
    Buyer
    Seller

    {{com.username}}

    {{com.ctime}}

    {{com.content}}

    • {{com2.username}}
      {{com2.username}}
      Buyer
      Seller

      {{com2.username}}

      {{com2.ctime}}

      {{com2.content}}