File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class GotoNextScene : MonoBehaviour
{
public int sceneNum;
public int motionIndex;
public Button btnGotoNextLevel;
// Start is called before the first frame update
void Start()
{
btnGotoNextLevel = gameObject.GetComponent<Button>();
btnGotoNextLevel.onClick.AddListener(NextScene);
}
// Update is called once per frame
void Update()
{
}
public void NextScene()
{
PlayerPrefs.SetInt("TKNum", motionIndex);
switch(motionIndex)
{
case 0:
PlayerPrefs.SetString("AnimName", "태극 1장");
break;
case 1:
PlayerPrefs.SetString("AnimName", "태극 2장");
break;
case 2:
PlayerPrefs.SetString("AnimName", "태극 3장");
break;
case 3:
PlayerPrefs.SetString("AnimName", "태극 4장");
break;
case 4:
PlayerPrefs.SetString("AnimName", "태극 5장");
break;
case 5:
PlayerPrefs.SetString("AnimName", "태극 6장");
break;
case 6:
PlayerPrefs.SetString("AnimName", "태극 7장");
break;
case 7:
PlayerPrefs.SetString("AnimName", "태극 8장");
break;
case 8:
PlayerPrefs.SetString("AnimName", "고려");
break;
case 9:
PlayerPrefs.SetString("AnimName", "금강");
break;
case 10:
PlayerPrefs.SetString("AnimName", "태백");
break;
case 11:
PlayerPrefs.SetString("AnimName", "평원");
break;
case 12:
PlayerPrefs.SetString("AnimName", "십진");
break;
case 13:
PlayerPrefs.SetString("AnimName", "지태");
break;
case 14:
PlayerPrefs.SetString("AnimName", "일여");
break;
case 15:
PlayerPrefs.SetString("AnimName", "한수");
break;
}
UnityEngine.SceneManagement.SceneManager.LoadScene(sceneNum);
}
}