게임 플레이 추가 작업까지 진행된 소스
- GamePlayManager.Button.cs
using UnityEngine;
using System.Collections;
public partial class GamePlayManager {
public GameObject pauseWindow;
public UILabel speedButtonTextLb;
public void ClickPauseButton()
{
Time.timeScale = 0;
pauseWindow.SetActive(true);
}
public void ClickSpeedButton()
{
if( Time.timeScale == 0.0f) return;
if(Time.timeScale == 1.0f)
{
Time.timeScale = 2.0f;
speedButtonTextLb.text = "2x";
}
else
{
Time.timeScale = 1.0f;
speedButtonTextLb.text = "1x";
}
}
public void ClickPauseReloadButton()
{
if( nowGameState == GameState.loading ) return;
nowGameState = GameState.loading;
Time.timeScale = 1;
Application.LoadLevel("PlayScene");
}
public void ClickPausePlayButton()
{
if( speedButtonTextLb.text == "2x" )
{
Time.timeScale = 2.0f;
}
else
{
Time.timeScale = 1.0f;
}
pauseWindow.SetActive(false);
}
public void ClickPauseHomeButton()
{
LoadReadyScene(false);
}
void LoadReadyScene(bool isPrepareGame)
{
GameData.Instance.isPrepareGame = isPrepareGame;
Application.LoadLevelAsync("LobbyScene");
}
public void ClickResultHomeButton()
{
LoadReadyScene(false);
}
public void ClickReGameButton ()
{
LoadReadyScene(true);
}
}