Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- using UnityEngine.SceneManagement;
- public class Skin_Selection : MonoBehaviour {
- private string Skin;
- public Text[] Button_texts;
- private int i = 0;
- // Use this for initialization
- void Start ()
- {
- Skin = PlayerPrefs.GetString("Skin_type", "Normal");
- }
- // Update is called once per frame
- void Update ()
- {
- }
- public void Set_Normal()
- {
- PlayerPrefs.SetString("Skin_type", "Normal");
- for(i=0;i<Button_texts.Length;i++)
- {
- if (i == 0)
- Button_texts[i].text = "Selected";
- else
- Button_texts[i].text = "Select";
- }
- }
- public void Set_Headphone()
- {
- PlayerPrefs.SetString("Skin_type", "Headphone");
- for (i = 0; i < Button_texts.Length; i++)
- {
- if (i == 1)
- Button_texts[i].text = "Selected";
- else
- Button_texts[i].text = "Select";
- }
- }
- public void Play_Game()
- {
- SceneManager.LoadScene(0);
- }
- }
Add Comment
Please, Sign In to add comment