using UnityEngine;
using System.Collections;
public class GM : MonoBehaviour {
//유저와 적의 이미지(8강)
public UISprite player_Img;
public UISprite enemy_Img;
//카운트 이미지
public UISprite count_Img;
//유저의 버튼
public GameObject player_Ga_Button;
public GameObject player_Ba_Button;
public GameObject player_Bo_Button;
//승부 버튼
public GameObject stop_Button;
// Use this for initialization
void Start () {
//카운트 코루틴 호출
StartCoroutine(Count());
}
// Update is called once per frame
void Update () {
}
//카운트 코루틴
IEnumerator Count()
{
count_Img.spriteName = "3";
yield return new WaitForSeconds(1.0f);
count_Img.spriteName = "2";
yield return new WaitForSeconds(1.0f);
count_Img.spriteName = "1";
yield return new WaitForSeconds(1.0f);
count_Img.spriteName = "Go";
//시작된 이후에는, 가위바위보 선택버튼과 승부 버튼을 On 해준다.
player_Ga_Button.gameObject.SetActive(true);
player_Ba_Button.gameObject.SetActive(true);
player_Bo_Button.gameObject.SetActive(true);
stop_Button.gameObject.SetActive(true);
}
//유저가 버튼을 눌러 이미지를 변경하는 메소드 모음
void PlayerButtonImgChange_Ga()
{
player_Img.spriteName = "Ga";
}
void PlayerButtonImgChange_Ba()
{
player_Img.spriteName = "Ba";
}
void PlayerButtonImgChange_Bo()
{
player_Img.spriteName = "Boouo";
}
}