diff --git a/Assets/OneShotOneKill.txt b/Assets/OneShotOneKill.txt index eccc536..7f0fa86 100644 --- a/Assets/OneShotOneKill.txt +++ b/Assets/OneShotOneKill.txt @@ -1,5 +1,3 @@ -타이머 적용 - - 시간 다 되면 패배 승리 화면 경험치 획득 레벨 업 및 스킬 선택 diff --git a/Assets/Script/InGame/IngameMgr.cs b/Assets/Script/InGame/IngameMgr.cs index 6489850..ef7e79c 100644 --- a/Assets/Script/InGame/IngameMgr.cs +++ b/Assets/Script/InGame/IngameMgr.cs @@ -22,6 +22,7 @@ public class IngameMgr : MonoBehaviourSingletonTemplate StageConfigTableData CurStageData; UnitTableData CurUnitData; Dictionary> mob_pools = new Dictionary>(); + float f_Time; private void OnEnable() { @@ -33,12 +34,18 @@ public class IngameMgr : MonoBehaviourSingletonTemplate m_HP = CurUnitData.n_DefaultHp; m_Lv = m_Wave = 1; m_Exp = m_Coin = m_Item = 0; + f_Time = 90f; Set_Texts(); StartCoroutine(Co_MakeMob()); } + private void Update() + { + Set_Timer(); + } + public void ReturnMob(MobActor mob) { mob.gameObject.SetActive(false); @@ -54,6 +61,18 @@ public class IngameMgr : MonoBehaviourSingletonTemplate t_hp.text = m_HP.ToString(); slider_exp.value = 0f; } + void Set_Timer() + { + if (f_Time > 0) + { + f_Time -= Time.deltaTime; + t_timer.text = DSUtil.Get_TimeText_MS(f_Time); + if(f_Time <= 0f) + { + GameUI.Ins.Set_UI(7); + } + } + } IEnumerator Co_MakeMob() {