Advertisement
urnamed32

Ana Menü

Jun 19th, 2018
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. // Unity3D Dersleri - 19.06.2018 https://www.youtube.com/Unity3DDersleri \\
  2. // Discord: https://discord.gg/2e8ANba \\
  3.  
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using UnityEngine;
  7.  
  8. public class UIMain : MonoBehaviour {
  9.  
  10.     [Header("UIPages")]
  11.     public GameObject settingsScreen;
  12.     public GameObject creditsScreen;
  13.     public GameObject mainScreen;
  14.  
  15.     public void StartGame()
  16.     {
  17.         //Oyunu başlatacak kısım.
  18.         Application.LoadLevel("levelİsmi");
  19.     }
  20.  
  21.     public void Settings()
  22.     {
  23.         mainScreen.SetActive(false);
  24.         settingsScreen.SetActive(true);
  25.     }
  26.  
  27.     public void set2Menu()
  28.     {
  29.         mainScreen.SetActive(true);
  30.         settingsScreen.SetActive(false);
  31.     }
  32.  
  33.     public void Credits()
  34.     {
  35.         mainScreen.SetActive(false);
  36.         creditsScreen.SetActive(true);
  37.     }
  38.  
  39.     public void cre2Menu()
  40.     {
  41.         mainScreen.SetActive(true);
  42.         creditsScreen.SetActive(false);
  43.     }
  44.  
  45.     public void Exit()
  46.     {
  47.         Application.Quit();
  48.     }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement