44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class MapObjMgr : MonoBehaviourSingletonTemplate<MapObjMgr>
|
|
{
|
|
List<Actor> list_objActor = new List<Actor>();
|
|
List<Actor> rtn_actors = new List<Actor>();
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
var objs = GetComponentsInChildren<Actor>();
|
|
for (int i = 0; i < objs.Length; i++)
|
|
list_objActor.Add(objs[i]);
|
|
}
|
|
|
|
public List<Actor> Get_Objs()
|
|
{
|
|
rtn_actors.Clear();
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
// TODO 정인호 : 맵 오픈 확인용인데 필요없을 듯
|
|
var chapter = MyValue.MyChoiceMapData.n_MapID; // InGameInfo.Ins.Get_CurStageData().Chapter;
|
|
var open1 = chapter == 103 && sdata.Get_Common(eCommon.DungeonOpen1) == 1;
|
|
var open2 = chapter == 103 && sdata.Get_Common(eCommon.DungeonOpen2) == 1;
|
|
for (int i = 0; i < list_objActor.Count; i++)
|
|
{
|
|
if (!list_objActor[i].IsDead())
|
|
{
|
|
if (list_objActor[i].Get_Group() == 9)
|
|
{
|
|
if (open1) rtn_actors.Add(list_objActor[i]);
|
|
}
|
|
else if (list_objActor[i].Get_Group() >= 15)
|
|
{
|
|
if (open2) rtn_actors.Add(list_objActor[i]);
|
|
}
|
|
else
|
|
rtn_actors.Add(list_objActor[i]);
|
|
}
|
|
}
|
|
return rtn_actors;
|
|
}
|
|
} |