던전 공통 정보 스크립트 추가, 미믹 던전 내에 미믹 생성 등

This commit is contained in:
Ino 2025-01-23 15:49:08 +09:00
parent 41d9506e15
commit 7e2df126c1
19 changed files with 188 additions and 4952 deletions

View File

@ -124,8 +124,8 @@ ModelImporter:
curves: []
events:
- time: 0.13808464
functionName: Projetile
data:
functionName: Projectile
data: MeleeAttack
objectReferenceParameter: {instanceID: 0}
floatParameter: 0
intParameter: 0

View File

@ -1 +1 @@
[{"e_DungeonType": "맵 종류", "n_MapLv": "맵 Lv", "n_MobCount": "등장 몬스터 수", "n_SpawnID": "AppearTable", "f_MakeGap": "생성 주기", "f_Time": "제한 시간(초)"}, {"e_DungeonType": "d1_Mimic", "n_MapLv": "1", "n_MobCount": "50", "n_SpawnID": "1", "f_MakeGap": "0.5", "f_Time": "30"}, {"e_DungeonType": "d2_Maze", "n_MapLv": "1", "n_MobCount": "0", "n_SpawnID": "1", "f_MakeGap": "0", "f_Time": "90"}, {"e_DungeonType": "d3_Nightmare", "n_MapLv": "1", "n_MobCount": "0", "n_SpawnID": "1", "f_MakeGap": "0", "f_Time": "90"}, {"e_DungeonType": "d4_Wave", "n_MapLv": "1", "n_MobCount": "0", "n_SpawnID": "1", "f_MakeGap": "0", "f_Time": "1800"}]
[{"e_DungeonType": "맵 종류", "n_MapLv": "맵 Lv", "n_MobCount": "등장 몬스터 수", "n_SpawnID": "AppearTable", "n_MobID": "MonsterListTable", "f_MakeGap": "생성 주기", "f_Time": "제한 시간(초)"}, {"e_DungeonType": "d1_Mimic", "n_MapLv": "1", "n_MobCount": "50", "n_SpawnID": "1", "n_MobID": "1001", "f_MakeGap": "0.5", "f_Time": "30"}, {"e_DungeonType": "d1_Mimic", "n_MapLv": "1", "n_MobCount": "60", "n_SpawnID": "2", "n_MobID": "1001", "f_MakeGap": "0.49", "f_Time": "30"}, {"e_DungeonType": "d2_Maze", "n_MapLv": "1", "n_MobCount": "0", "n_SpawnID": "1", "n_MobID": "1002", "f_MakeGap": "0", "f_Time": "90"}, {"e_DungeonType": "d3_Nightmare", "n_MapLv": "1", "n_MobCount": "0", "n_SpawnID": "1", "n_MobID": "1003", "f_MakeGap": "0", "f_Time": "90"}, {"e_DungeonType": "d4_Wave", "n_MapLv": "1", "n_MobCount": "0", "n_SpawnID": "1", "n_MobID": "1004", "f_MakeGap": "0", "f_Time": "1800"}]

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -375,6 +375,51 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2049409406
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2049409408}
- component: {fileID: 2049409407}
m_Layer: 0
m_Name: DungeonInfo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2049409407
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2049409406}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7ed190b399bd4be4ebc361c911eb9d95, type: 3}
m_Name:
m_EditorClassIdentifier:
go_Camera: {fileID: 0}
--- !u!4 &2049409408
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2049409406}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2075457781
PrefabInstance:
m_ObjectHideFlags: 0
@ -567,3 +612,4 @@ SceneRoots:
- {fileID: 2075457781}
- {fileID: 663358097}
- {fileID: 1671388997}
- {fileID: 2049409408}

View File

@ -826,9 +826,10 @@ public class Actor : MyCoroutine
if (_ispc)
{
m_Target.Set_Outline(true);
// 퀘스트 몹은 선택 사항이므로 마녀가 터치로만 타겟을 잡을 수가 있다. 퀘스트몹을 선택했다는 것은 퀘스트를 하겠다는 뜻이므로 모든 펫이 같이 때린다.
// 강화석도 같이 캐자
if (m_Target.IsRole(eRole.QuestMob) || (m_Target.IsRole(eRole.OBJ) && m_Target.m_SubRole == eSubRol.Ore))
// 퀘스트 몹은 선택 사항이므로 마녀가 터치로만 타겟을 잡을 수가 있다.
// 퀘스트몹을 선택했다는 것은 퀘스트를 하겠다는 뜻이므로 모든 펫이 같이 때린다.
// 강화석도 같이 캐자.
if (m_Target.IsRole(eRole.OBJ))
ActorInfo.Ins.Get_Actors(eRole.Pet, 0).ForEach(f => f.Change_Target(false, m_Target));
}
}

View File

@ -41,7 +41,7 @@ public class MobActor : Actor
//else m_AttackType == eAttackType.Range && m_NavMeshAgent.stoppingDistance > 20f) m_NavMeshAgent.stoppingDistance = 20f;
}
if (m_SubRole == eSubRol.Dummy) IsStop = true;
//if (m_SubRole == eSubRol.Dummy) IsStop = true; // 가만히 맞아야 할 때
#if UNITY_EDITOR
if (SceneManager.GetActiveScene().name == "StatTest") return;
@ -316,24 +316,8 @@ public class MobActor : Actor
{
switch (m_SubRole)
{
case eSubRol.Healer:
var allies = ActorInfo.Ins.Get_AlliesActors(IsEnemy(), Get_position());
var hurts = allies.FindAll(f => f.Get_HP() < f.Get_MaxHP());
m_Target = hurts.Count > 0 ? hurts[0] : null;
break;
case eSubRol.Dummy:
break;
case eSubRol.None:
case eSubRol.Ore:
case eSubRol.Witch:
default:
m_Target = ActorInfo.Ins.Get_Nearest_EnemyActor_orNull(IsEnemy(), Get_position());
// 내가 타게팅했으니 너도 날 타게팅 할 수 있어야 한다.
if (m_Target != null)
{
//ActorInfo.Ins.Add_FindTarget_AllPC(m_Target.IsEnemy(), m_Role, m_SpawnerId);
if (IsRole(eRole.QuestMob))
GoToTargetTime = 0f;
}
break;
}
}
@ -351,7 +335,7 @@ public class MobActor : Actor
base.VeryStrongDamage(dmg);
if (dmg > 1000000000000d) ServerInfo.Ins.m_ServerData.Add_Item(new ItemData(eItem.Title, 68, 1)); // 칭호 : 한방있는
}
protected override void Set_Die()
{
#if UNITY_EDITOR
@ -364,68 +348,47 @@ public class MobActor : Actor
m_actDie?.Invoke(m_MonsterTableData.n_MonsterID);
sdata.Add_CollectionMobKill(m_MonsterTableData.n_MonsterID);
base.Set_Die();
if (IsRole(eRole.QuestMob))
GameUI.Ins.IngameUI.m_ChapterQuest.Add_PurposeCount(new ChapterQuestAddData { purpose = ePurpose.SaveNPC });
m_DieTime = m_MonsterAppearData.f_SpawnerDelay;
//m_MonsterAppearData.Cal_DropItems(this);
if (IsRole(eRole.Boss))
{
Time.timeScale = 0.3f;
Set_Coroutine(() =>
{
Time.timeScale = MyValue.Get_GameSpeed();
}, 0.4f);
sdata.Add_MissionCount(MyValue.arr_Mission[0], 3);
sdata.Add_MissionCount(MyValue.arr_Mission[1], 2);
if (dic_ccData[eCC.Freeze].CCTime > 0) sdata.Add_TitleCondition(57); // 칭호 : 얼음땡
if (dic_ccData[eCC.KnockedAirborne].CCTime > 0) sdata.Add_TitleCondition(58); // 칭호 : 비행기 태우는
//GameUI.Ins.IngameUI.m_ChapterQuest.Add_PurposeCount(new ChapterQuestAddData { purpose = ePurpose.BossKill, mobid = m_MonsterTableData.n_MonsterID });
}
else
{
m_DieTime = m_MonsterAppearData.f_SpawnerDelay;
//m_MonsterAppearData.Cal_DropItems(this);
if (IsRole(eRole.Boss))
{
Time.timeScale = 0.3f;
Set_Coroutine(() =>
{
Time.timeScale = MyValue.Get_GameSpeed();
}, 0.4f);
sdata.Add_MissionCount(MyValue.arr_Mission[0], 3);
sdata.Add_MissionCount(MyValue.arr_Mission[1], 2);
if (dic_ccData[eCC.Freeze].CCTime > 0) sdata.Add_TitleCondition(57); // 칭호 : 얼음땡
if (dic_ccData[eCC.KnockedAirborne].CCTime > 0) sdata.Add_TitleCondition(58); // 칭호 : 비행기 태우는
//GameUI.Ins.IngameUI.m_ChapterQuest.Add_PurposeCount(new ChapterQuestAddData { purpose = ePurpose.BossKill, mobid = m_MonsterTableData.n_MonsterID });
}
else
{
#if UNITY_EDITOR
if (SceneManager.GetActiveScene().name == "StatTest") return;
if (SceneManager.GetActiveScene().name == "StatTest") return;
#endif
sdata.Add_MissionCount(MyValue.arr_Mission[0], 2);
sdata.Add_MissionCount(MyValue.arr_Mission[1], 1);
sdata.Add_MissionCount(MyValue.arr_Mission[0], 2);
sdata.Add_MissionCount(MyValue.arr_Mission[1], 1);
//GameUI.Ins.IngameUI.m_ChapterQuest.Add_PurposeCount(new ChapterQuestAddData { purpose = ePurpose.MobKill, mobid = m_MonsterTableData.n_MonsterID });
}
//GameUI.Ins.IngameUI.m_ChapterQuest.Add_PurposeCount(new ChapterQuestAddData { purpose = ePurpose.MobKill, mobid = m_MonsterTableData.n_MonsterID });
}
}
public override void Shoot_Skill()
{
base.Shoot_Skill();
if (IsRole(eRole.MemoryMob) && m_SubRole == eSubRol.Witch) { }
else Reset_AttackCoolTime();
Reset_AttackCoolTime();
}
public override void Get_Damage(DamageInfo _dinfo)
{
//_dinfo.Damage = 1f; // 테스트 : 몹 안 죽게
base.Get_Damage(_dinfo);
switch (m_Role)
{
case eRole.QuestMob:
case eRole.MemoryMob:
if (m_SubRole == eSubRol.Dummy)
{
if (!GameUI.Ins.IngameUI.m_StageTimeUI.Get_Start()) GameUI.Ins.IngameUI.m_StageTimeUI.Set_Start();
// 젬 드랍
if (DSUtil.RandomTrue(0.1f))
InGameInfo.Ins.Shoot_Effect(new ProjectileData { shooter = this, m_Skill = eEffect.DropItem_Gem });
return; // 더미는 타겟 안 잡음
}
break;
}
// 멀리서 맞았으면 맞은 몹을 타겟으로 잡고 주변 몹들도 같이 간다.
if (m_Target == null || IsRole(eRole.QuestMob))
if (DSUtil.CheckNull(m_Target))
{
if (m_Target == null)
Change_Target(false, _dinfo.Beater, true);

View File

@ -120,7 +120,7 @@ public class MyActor : Actor
public override void Get_Damage(DamageInfo _dinfo)
{
base.Get_Damage(_dinfo);
if (DSUtil.CheckNull(m_Target) || m_Target.IsDead() || m_Target.m_SubRole == eSubRol.Ore)
if (DSUtil.CheckNull(m_Target) || m_Target.IsDead())
{
m_Target = _dinfo.Beater;
}

View File

@ -17,7 +17,7 @@ public class ActorInfo : MonoBehaviour
/// </summary>
Dictionary<eRole, Dictionary<int, Dictionary<string, List<Actor>>>> dic_actor = new Dictionary<eRole, Dictionary<int, Dictionary<string, List<Actor>>>>();
List<eRole> destroylst = new List<eRole> { eRole.PC, eRole.Pet, eRole.Fairy, eRole.Mob, eRole.Boss, eRole.BattleNPC, eRole.OBJ, eRole.QuestMob, eRole.MemoryMob, eRole.Farmer };
List<eRole> destroylst = new List<eRole> { eRole.PC, eRole.Pet, eRole.Fairy, eRole.Mob, eRole.Boss, eRole.BattleNPC, eRole.OBJ, eRole.Farmer };
public void Destroy_Mobs()
{

View File

@ -0,0 +1,68 @@
using CodeStage.AntiCheat.ObscuredTypes;
using System;
using System.Collections;
using UnityEngine;
using WebSocketSharp;
public class DungeonInfo : MonoBehaviourSingletonTemplate<DungeonInfo>
{
public ObscuredFloat m_Time;
public ObscuredInt m_MaxDieMobCount;
public Action<float> act_Time;
public Action<int> act_MobDieCount;
ObscuredInt m_DieCount;
public void Stop_Dungeon() { act_Time = null; StopAllCoroutines(); }
IEnumerator Co_Update_Time()
{
while (m_Time > 0f)
{
yield return null;
m_Time -= Time.deltaTime;
m_Time.RandomizeCryptoKey();
act_Time?.Invoke(m_Time);
}
// 시간 오버
Stop_Dungeon();
}
void Set_MobDie(int mobid)
{
++m_DieCount;
m_DieCount.RandomizeCryptoKey();
act_MobDieCount?.Invoke(m_DieCount);
if (m_DieCount == m_MaxDieMobCount)
Stop_Dungeon();
}
public void Start_Mimic() { StartCoroutine(Co_Update_Mimic()); }
IEnumerator Co_Update_Mimic()
{
m_DieCount = 0;
m_DieCount.RandomizeCryptoKey();
yield return new WaitForSeconds(1f);
StartCoroutine(Co_Update_Time());
var data = MyValue.MyChoiceMapData;
var mapdata = table_battlemapconfig.Ins.Get_Data(data.n_MapID);
var dungeonData = table_dungeonmapconfig.Ins.Get_Data_orNull(mapdata.e_Dungeon, data.n_DungeonLv);
var mimicData = table_monsterlist.Ins.Get_Data_orNull(dungeonData.n_MobID);
var mobCount = dungeonData.n_MobCount;
while (mobCount > 0)
{
--mobCount;
AddrResourceMgr.Ins.LoadObject<GameObject>(mimicData.s_MonsterPrefab, handle =>
{
var mob = DSUtil.Get_Clone<MobActor>(handle.Result);
ActorInfo.Ins.Add_Actor(mob, eRole.Mob, dungeonData.n_SpawnID, mimicData.s_MonsterPrefab);
mob.Set(true, null, null, dungeonData.n_SpawnID, false);
var rdnpos = DSUtil.Get_RandomPos_onNavMesh(MyValue.MyPC.Get_position(), 0f, 10f);
mob.Set(eRole.Mob, mimicData, rdnpos, Set_MobDie, 0);
mob.m_SubRole = eSubRol.Mimic;
});
yield return new WaitForSeconds(dungeonData.f_MakeGap);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7ed190b399bd4be4ebc361c911eb9d95
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -21,7 +21,7 @@ public class SaveNPCMgr : MonoBehaviourSingletonTemplate<SaveNPCMgr>
else
{
var mob = temp.GetComponent<MobActor>();
mob.m_Role = eRole.QuestMob;
//mob.m_Role = eRole.QuestMob;
list_mob.Add(mob);
}
}

View File

@ -28,6 +28,13 @@ public class DungeonMapConfigTableData : TableDataBase
set { _SpawnID = value; _SpawnID.RandomizeCryptoKey(); }
}
ObscuredInt _MobID;
public int n_MobID
{
get { return _MobID; }
set { _MobID = value; _MobID.RandomizeCryptoKey(); }
}
ObscuredFloat _MakeGap;
public float f_MakeGap
{

View File

@ -1,4 +1,3 @@
using CodeStage.AntiCheat.ObscuredTypes;
using TMPro;
using UnityEngine;
@ -6,31 +5,15 @@ public class Ingame_DungeonBase : MonoBehaviour
{
public TextMeshProUGUI[] texts_base; // 0 던전&Lv, 1 남은 시간
ObscuredFloat m_Time;
public virtual void Set(float time)
{
gameObject.SetActive(true);
m_Time = time;
m_Time.RandomizeCryptoKey();
Set_TextTime();
}
void Set_TextTime() { texts_base[1].text = Mathf.Max(0f, m_Time).ToString("F2"); }
private void Update()
{
if (m_Time > 0f)
{
m_Time -= Time.deltaTime;
Set_TextTime();
if (m_Time <= 0f)
{
// 결과 화면
}
}
Set_TextTime(time);
DungeonInfo.Ins.m_Time = time;
DungeonInfo.Ins.act_Time = Set_TextTime;
}
void Set_TextTime(float time) { texts_base[1].text = Mathf.Max(0f, time).ToString("F2"); }
public virtual void Set_MaxMobCount(int maxCount) { }
public virtual void Add_MobCount() { }
public virtual void Add_MobCount(int mobid) { }
}

View File

@ -12,9 +12,12 @@ public class Ingame_Mimic : Ingame_DungeonBase
MaxMobCount = maxCount;
MaxMobCount.RandomizeCryptoKey();
MobCount = -1;
Add_MobCount();
Add_MobCount(0);
DungeonInfo.Ins.m_MaxDieMobCount = MaxMobCount;
DungeonInfo.Ins.m_MaxDieMobCount.RandomizeCryptoKey();
DungeonInfo.Ins.act_MobDieCount = Add_MobCount;
}
public override void Add_MobCount()
public override void Add_MobCount(int mobid)
{
++MobCount;
MobCount.RandomizeCryptoKey();

View File

@ -71,6 +71,7 @@ public class NewGameUI : MonoBehaviourSingletonTemplate<NewGameUI>
}
m_BattleUI.Set(eUICardType.Use, ServerInfo.Ins.m_ServerData.Equip.Preset);
go_Camera.SetActive(false);
}
public TextMeshProUGUI text_joysticktype;

View File

@ -2,8 +2,8 @@ public enum eGameMode { Lobby, Stage, MyFarm, Dungeon, Max } // list 순서
public enum eDungeon { None, d1_Mimic, d2_Maze, d3_Nightmare, d4_Wave }
public enum eDifficult { Normal, Hard, NightMare, Hell, Max }
public enum eUnlockCondition { None, BossKill, GetItem, SealBreaking, ChapterClear, }
public enum eRole { Mob, Boss, Pet, PC, Fairy, EnemyPC, Farmer, Summon, BattleNPC, OBJ, QuestMob, MemoryMob, EnemyPet, EnemySummon }
public enum eSubRol { None, Healer, Dummy, Ore, Witch }
public enum eRole { Mob, Boss, Pet, PC, Fairy, EnemyPC, Farmer, Summon, BattleNPC, OBJ, EnemyPet, EnemySummon }
public enum eSubRol { None, Mimic, }
public enum eClassType { SwordMan, Archer, Fighter, Mage }
public enum eSpawnerType { Random, Order, Phase, PhaseAllKill }
public enum eAnim { Idle, Run, Die, Hit, Dodge, Attack, Attack2, Attack3, Attack4, Skill }

View File

@ -175,17 +175,13 @@ public class RealCamera : MyCoroutine
void Start_Game()
{
ActorInfo.Ins.All_Stop(false);
NewGameUI.Ins.go_Camera.SetActive(true);
Time.timeScale = MyValue.Get_GameSpeed();
// TODO 정인호 : 게임 시작 시 컨텐츠 등 체크 주석 처리
//GameUI.Ins.Set_AllUI(true);
//var chapter = InGameInfo.Ins.Get_CurStageData().Chapter;
//if (chapter == 101 || chapter == 103 || chapter == 104)
// GameUI.Ins.IngameUI.m_StageTimeUI.Set_Start();
//if (chapter < 101 && ServerInfo.Ins.m_ServerData.PC.Get_Lv(4) > 0)
// GameUI.Ins.IngameUI.m_SelectSkillUI.Set(null);
//else
switch (MyValue.MyChoiceMapData.n_MapID)
{
ActorInfo.Ins.All_Stop(false);
case 1001: DungeonInfo.Ins.Start_Mimic(); break; // 미믹던전
}
}