경험치 획득

레벨 업 및 스킬 선택
This commit is contained in:
Ino 2026-01-14 13:07:18 +09:00
parent b14add5f76
commit 1afddcaefd
13 changed files with 575 additions and 1268 deletions

View File

@ -1,7 +1,9 @@
경험치 획득
레벨 업 및 스킬 선택
화살표 지정하면 해당 위치로 계속 쏘기
실제 스킬 선택
스킬 15종
몬스터 이동방식 구현
// - 직진
- 지그재그

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
[{"n_Lv":"1","n_NextRequireExp":"3","n_TotalExp":"3"},{"n_Lv":"2","n_NextRequireExp":"7","n_TotalExp":"10"},{"n_Lv":"3","n_NextRequireExp":"14","n_TotalExp":"24"},{"n_Lv":"4","n_NextRequireExp":"22","n_TotalExp":"46"},{"n_Lv":"5","n_NextRequireExp":"32","n_TotalExp":"78"},{"n_Lv":"6","n_NextRequireExp":"43","n_TotalExp":"121"},{"n_Lv":"7","n_NextRequireExp":"55","n_TotalExp":"176"},{"n_Lv":"8","n_NextRequireExp":"68","n_TotalExp":"244"},{"n_Lv":"9","n_NextRequireExp":"82","n_TotalExp":"326"},{"n_Lv":"10","n_NextRequireExp":"97","n_TotalExp":"423"},{"n_Lv":"11","n_NextRequireExp":"114","n_TotalExp":"537"},{"n_Lv":"12","n_NextRequireExp":"132","n_TotalExp":"669"},{"n_Lv":"13","n_NextRequireExp":"151","n_TotalExp":"820"},{"n_Lv":"14","n_NextRequireExp":"172","n_TotalExp":"992"},{"n_Lv":"15","n_NextRequireExp":"194","n_TotalExp":"1186"},{"n_Lv":"16","n_NextRequireExp":"219","n_TotalExp":"1405"},{"n_Lv":"17","n_NextRequireExp":"245","n_TotalExp":"1650"},{"n_Lv":"18","n_NextRequireExp":"272","n_TotalExp":"1922"},{"n_Lv":"19","n_NextRequireExp":"300","n_TotalExp":"2222"},{"n_Lv":"20","n_NextRequireExp":"0","n_TotalExp":"2222"}]

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ecb13b1f4ef0518419f9debdc2284678
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -15,6 +15,7 @@ GameObject:
- component: {fileID: 8498079829055956521}
- component: {fileID: 4675958707163654338}
- component: {fileID: 8139660753225562573}
- component: {fileID: 8626793401385054597}
m_Layer: 0
m_Name: Tables
m_TagString: Untagged
@ -115,3 +116,16 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_json: {fileID: 4900000, guid: e42ac2af9fcbeda4da8d33ba81061290, type: 3}
--- !u!114 &8626793401385054597
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5906217593366369380}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 361d0af5e46bee04da9b3de172e0516b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_json: {fileID: 4900000, guid: ecb13b1f4ef0518419f9debdc2284678, type: 3}

File diff suppressed because it is too large Load Diff

View File

@ -133,7 +133,7 @@ public class MobActor : MonoBehaviour
m_HUD_HP.Set(m_HP);
if (m_HP <= 0)
{
IngameMgr.Ins.Add_MobKill();
IngameMgr.Ins.Add_MobKill(m_Data.n_DropExp);
gameObject.SetActive(false);
}
}

View File

@ -19,12 +19,12 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
[Header("Fence")]
public Transform tf_fence;
int m_Wave, m_HP, m_Coin, m_Item, m_Lv, m_Exp;
int m_Wave, m_HP, m_Coin, m_Item, m_Exp;
StageConfigTableData CurStageData;
UnitTableData CurUnitData;
Dictionary<string, List<MobActor>> mob_pools = new Dictionary<string, List<MobActor>>();
float f_Time;
ObscuredInt m_MobMakeCount, m_MobDieCount;
ObscuredInt m_Lv, m_MobMakeCount, m_MobDieCount;
private void OnEnable()
{
@ -36,6 +36,7 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
m_HP = CurUnitData.n_DefaultHp;
m_Lv = m_Wave = 1;
m_Lv.RandomizeCryptoKey();
m_Exp = m_Coin = m_Item = 0;
f_Time = 90f;
m_MobDieCount = 0; m_MobDieCount.RandomizeCryptoKey();
@ -47,6 +48,7 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
m_MobMakeCount.RandomizeCryptoKey();
Set_Texts();
Set_Exp(0);
StartCoroutine(Co_MakeMob());
}
@ -69,7 +71,31 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
slider_wave.value = (m_Wave - 1) / (float)CurStageData.n_MaxWave;
t_hp.text = m_HP.ToString();
slider_exp.value = 0f;
}
void Set_Exp(int exp)
{
m_Exp += exp;
var currentLvData = table_BattleLevelUp.Ins.Get_Data(m_Exp);
if (m_Lv < currentLvData.n_Lv || (m_Lv == currentLvData.n_Lv && currentLvData.n_TotalExp <= m_Exp))
{
++m_Lv;
GameUI.Ins.Set_OverUI(6, true);
Time.timeScale = 0f;
}
var nextLvData = table_BattleLevelUp.Ins.Get_Data_orNull(currentLvData.n_Lv + 1);
if (nextLvData != null)
{
if (m_Lv == 1)
slider_exp.value = (float)m_Exp / currentLvData.n_TotalExp;
else
slider_exp.value = (float)(m_Exp - currentLvData.n_TotalExp) / (nextLvData.n_TotalExp - currentLvData.n_TotalExp);
}
else
{
slider_exp.value = 1f;
}
}
void Set_Timer()
{
@ -176,11 +202,13 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
if (m_HP < 0) GameUI.Ins.Set_UI(7);
}
public void Add_MobKill()
public void Add_MobKill(int exp)
{
++m_MobDieCount; m_MobDieCount.RandomizeCryptoKey();
if (m_MobDieCount >= m_MobMakeCount)
GameUI.Ins.Set_UI(8);
else
Set_Exp(exp);
}
public StageConfigTableData Get_CurStageTData() { return CurStageData; }

View File

@ -0,0 +1,26 @@
using UnityEngine;
public class Play_UI_ChoiceSkill : MonoBehaviour
{
float CanSelectTime;
private void OnEnable()
{
CanSelectTime = 2f;
}
private void Update()
{
if (CanSelectTime > 0)
CanSelectTime -= Time.fixedUnscaledDeltaTime;
}
public void OnClick_Skill(int index)
{
if (CanSelectTime <= 0f)
{
GameUI.Ins.Set_OverUI(6, false);
Time.timeScale = 1f;
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 546c1e0016e275f41b99ad4700db9e8d

View File

@ -0,0 +1,62 @@
using CodeStage.AntiCheat.ObscuredTypes;
using Newtonsoft.Json;
using System.Collections.Generic;
public class BattleLevelUpTableData
{
ObscuredInt _Lv;
public int n_Lv
{
get { return _Lv; }
set { _Lv = value; _Lv.RandomizeCryptoKey(); }
}
ObscuredInt _NextRequireExp;
public int n_NextRequireExp
{
get { return _NextRequireExp; }
set { _NextRequireExp = value; _NextRequireExp.RandomizeCryptoKey(); }
}
ObscuredInt _TotalExp;
public int n_TotalExp
{
get { return _TotalExp; }
set { _TotalExp = value; _TotalExp.RandomizeCryptoKey(); }
}
}
public class table_BattleLevelUp : table_base
{
public static table_BattleLevelUp Ins;
List<BattleLevelUpTableData> tableDatas;
Dictionary<int, BattleLevelUpTableData> dic_data = new Dictionary<int, BattleLevelUpTableData>();
protected override void Awake()
{
Ins = this;
base.Awake();
}
protected override void Start()
{
tableDatas = JsonConvert.DeserializeObject<List<BattleLevelUpTableData>>(json_last);
for (int i = 0; i < tableDatas.Count; i++)
dic_data.Add(tableDatas[i].n_Lv, tableDatas[i]);
base.Start();
}
public List<BattleLevelUpTableData> Get_DataList() { return tableDatas; }
public BattleLevelUpTableData Get_Data_orNull(int id) { return dic_data.ContainsKey(id) ? dic_data[id] : null; }
public BattleLevelUpTableData Get_Data(int exp)
{
for (int i = tableDatas.Count - 1; i >= 0; i--)
{
if (tableDatas[i].n_TotalExp <= exp)
return tableDatas[i];
}
return tableDatas[0];
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 361d0af5e46bee04da9b3de172e0516b