66 lines
1.8 KiB
C#
66 lines
1.8 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class MobInfo : MyCoroutine
|
|
{
|
|
public static MobInfo Ins;
|
|
|
|
public OnInitStage onInitStage;
|
|
public delegate void OnInitStage();
|
|
public OnChangeWave onChangeWave;
|
|
public delegate void OnChangeWave(int stage, int wave);
|
|
//public PortalMgr m_PortalMgr;
|
|
|
|
Action onMobLoadFinish;
|
|
ObscuredInt m_wave = -1, DeadCount = 0, m_diff, m_chapter, m_stage = 1;
|
|
Coroutine Co_LoadMemoryMob;
|
|
ServerData m_EnemyData;
|
|
bool StartCam, InitStage;
|
|
List<NoSeeLongDMob> list_NoSeeLongDMob = new List<NoSeeLongDMob>();
|
|
|
|
private void Awake()
|
|
{
|
|
Ins = this;
|
|
}
|
|
|
|
public void Start_Stage(Action onfinish)
|
|
{
|
|
onMobLoadFinish = onfinish;
|
|
End_Load();
|
|
StartCam = InitStage = false;
|
|
list_NoSeeLongDMob.Clear();
|
|
InGameInfo.Ins.StartCam();
|
|
}
|
|
public ServerData Get_Enemy() { return m_EnemyData; }
|
|
public void Set_Enemy(ServerData _data) { m_EnemyData = _data; }
|
|
|
|
public void Stop_LoadMemoryMob() { if (Co_LoadMemoryMob != null) { StopCoroutine(Co_LoadMemoryMob); Co_LoadMemoryMob = null; } }
|
|
|
|
void End_Load()
|
|
{
|
|
onMobLoadFinish?.Invoke();
|
|
onMobLoadFinish = null;
|
|
list_NoSeeLongDMob.ForEach(f => f.Set());
|
|
}
|
|
|
|
Coroutine crt_loadmobs;
|
|
public void End_Stage()
|
|
{
|
|
if (crt_loadmobs != null) StopCoroutine(crt_loadmobs);
|
|
ActorInfo.Ins.Destroy_Mobs();
|
|
|
|
}
|
|
|
|
public void Add_Dead()
|
|
{
|
|
//++DeadCount;
|
|
//if (DeadCount >= list_mobgroup[m_wave].transform.childCount)
|
|
// Set_Group();
|
|
}
|
|
|
|
public int Get_CurStage() { return m_stage; }
|
|
public int Get_CurWave() { return m_wave; }
|
|
} |