Advertisement
MrKubic

Untitled

Apr 12th, 2017
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class DayLesson : MonoBehaviour {
  6.  
  7.     int i = 35;
  8.     int min = 0;
  9.     int max = 35;  
  10.     public GameObject[] les;
  11.     //public GameObject Write;
  12.  
  13.     public void Onclick_Lesson_0()
  14.     {
  15.         les[0].gameObject.SetActive(true);
  16.         if (max < i||i > min)
  17.         {
  18.             les[1].gameObject.SetActive(false);
  19.         }
  20.         //gameObject[i].SetActive(true);
  21.         }
  22.     public void Onclick_Lesson_1()
  23.     {
  24.  
  25.         les[1].gameObject.SetActive(true);
  26.         if (i > 1)
  27.         {
  28.             les[0].gameObject.SetActive(false);
  29.         }
  30.         //gameObject[i].SetActive(true);
  31.     }
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement