수상한 미궁 몹 수 이상하고, 안 움직임 수정
This commit is contained in:
parent
ad58f1203b
commit
3feaa3d411
|
|
@ -15,7 +15,7 @@ public class MobActor : Actor
|
|||
protected int m_SpawnerId;
|
||||
protected eMobStatus MobStatus;
|
||||
Vector3 OriginalPos, TargetPatrolPos;
|
||||
float m_PatrolDelay, m_DieTime, f_BaseChaseRange, HealPerSec, HPRegenPerSec;
|
||||
float m_PatrolDelay, m_PatrolTime, f_BaseChaseRange, HealPerSec, HPRegenPerSec;
|
||||
bool b_IsFirstAttack, NoUpdate_byTool;
|
||||
protected MonsterAppearData m_MonsterAppearData;
|
||||
protected MonsterTableData m_MonsterTableData;
|
||||
|
|
@ -39,6 +39,7 @@ public class MobActor : Actor
|
|||
{
|
||||
base.Set(isEnemy, owner, sdata, _id, _stop);
|
||||
|
||||
m_PatrolTime = 0f;
|
||||
if (MagicID > 0) m_Magic = new UseMagicInfo { m_SkillTableData = table_skilllist.Ins.Get_Data_orNull(MagicID), m_uiIndex = -1 };
|
||||
m_SpawnerId = _id;
|
||||
m_MonsterAppearData = table_monsterappear.Ins.Get_Data_orNull(m_SpawnerId);
|
||||
|
|
@ -79,6 +80,7 @@ public class MobActor : Actor
|
|||
// 순찰 모드로 전환
|
||||
transform.SetPositionAndRotation(pos, Quaternion.identity);
|
||||
OriginalPos = pos;
|
||||
Set_Warp(pos);
|
||||
Change_MobStatus(eMobStatus.PatrolWait);
|
||||
|
||||
// 몹 스탯 설정
|
||||
|
|
@ -142,17 +144,16 @@ public class MobActor : Actor
|
|||
//if (!IsSubRole(eSubRol.Mimic))
|
||||
// Check_Battle();
|
||||
break;
|
||||
case eMobStatus.PatrolRot:
|
||||
// TargetPatrolPos 위치를 바라봄
|
||||
case eMobStatus.PatrolRot: // TargetPatrolPos 위치를 바라봄
|
||||
Vector3 directionToTarget = (TargetPatrolPos - transform.position).normalized;
|
||||
Quaternion lookRotation = Quaternion.LookRotation(new Vector3(directionToTarget.x, 0, directionToTarget.z));
|
||||
transform.rotation = Quaternion.Slerp(transform.rotation, lookRotation, Time.deltaTime * 5f);
|
||||
if (Quaternion.Angle(transform.rotation, lookRotation) < 5f)
|
||||
Change_MobStatus(eMobStatus.Patroling);
|
||||
break;
|
||||
case eMobStatus.Patroling:
|
||||
// TargetPatrolPos 위치로 이동함
|
||||
if (Complete_Destination())
|
||||
case eMobStatus.Patroling: // TargetPatrolPos 위치로 이동함
|
||||
m_PatrolTime -= Time.deltaTime;
|
||||
if (m_PatrolTime <= 0f || Complete_Destination())
|
||||
{
|
||||
Change_MobStatus(eMobStatus.PatrolWait);
|
||||
if (!IsSubRole(eSubRol.Mimic))
|
||||
|
|
@ -276,6 +277,7 @@ public class MobActor : Actor
|
|||
Play_Run();
|
||||
Set_Path(TargetPatrolPos);
|
||||
m_NavMeshAgent.stoppingDistance = 0.1f;
|
||||
m_PatrolTime = 5f;
|
||||
break;
|
||||
case eMobStatus.Battle:
|
||||
m_NavMeshAgent.stoppingDistance = m_NavStopDistance;
|
||||
|
|
@ -424,7 +426,6 @@ public class MobActor : Actor
|
|||
sdata.Add_MissionCount(ePurpose.KILL_MONSTER_ACC);
|
||||
}
|
||||
base.Set_Die();
|
||||
m_DieTime = m_MonsterAppearData.f_SpawnerDelay;
|
||||
}
|
||||
protected override void After_Die()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class PCActor : MyActor
|
|||
{
|
||||
MyValue.MyPC = null;
|
||||
if (!DSUtil.CheckNull(MyValue.m_RealCamera))
|
||||
MyValue.m_RealCamera.Set_Target(null, 0f);
|
||||
MyValue.m_RealCamera.Set_Target(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -185,15 +185,18 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate<DungeonInfo>
|
|||
|
||||
IEnumerator Co_Update_Maze()
|
||||
{
|
||||
float min = 10f, max = 20f;
|
||||
Vector3 centerpos = new Vector3(15f, 0f, 19f);
|
||||
float min = 0f, max = 5f;
|
||||
var dgData = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull();
|
||||
for (int i = 0; i < dgData.n_MobCount; i++)
|
||||
Make_Mob(eSubRol.None, table_monsterlist.Ins.Get_RandomData(eSubRol.None), dgData, MyValue.MyPC.Get_position(), min, max);
|
||||
Make_Mob(eSubRol.None, table_monsterlist.Ins.Get_RandomData(eSubRol.None), dgData, centerpos, min, max,
|
||||
mob => mob.transform.SetParent(transform));
|
||||
|
||||
if (m_MazeClear >= 5)
|
||||
{
|
||||
m_MazeClear = 0;
|
||||
Make_Mob(eSubRol.Boss, table_monsterlist.Ins.Get_RandomData(eSubRol.Boss), dgData, MyValue.MyPC.Get_position(), min, max);
|
||||
Make_Mob(eSubRol.Boss, table_monsterlist.Ins.Get_RandomData(eSubRol.Boss), dgData, centerpos, min, max,
|
||||
boss => boss.transform.SetParent(transform));
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class PCInfo : MonoBehaviourSingletonTemplate<PCInfo>
|
|||
AddrResourceMgr.Ins.Set_AddressableReleaseSelf(pc.gameObject);
|
||||
pc.Set(_IsEnemy, null, sdata, pcid, true);
|
||||
pc.Set_MyPet(null);
|
||||
(pc as PCActor).StartCam(pos =>
|
||||
LoadMapMgr.Ins.Get_PortalPos(MyValue.MyChoiceMapData, portalpos =>
|
||||
{
|
||||
// Pets -> 2024. 9. 21 펫은 한 마리로 변경
|
||||
dic_petbattle_deadcount[_IsEnemy][0] = dic_petbattle_deadcount[_IsEnemy][1] = 0;
|
||||
|
|
@ -31,29 +31,6 @@ public class PCInfo : MonoBehaviourSingletonTemplate<PCInfo>
|
|||
ActorInfo.Ins.Add_Actor(pc, _IsEnemy ? eRole.EnemyPC : eRole.PC, 0, costumetable.s_Prefab);
|
||||
}
|
||||
});
|
||||
|
||||
//// Fairy
|
||||
//var fairyid = sdata.Get_EqiupmentEquip(eItem.Fairy);
|
||||
//if (fairyid > 0)
|
||||
//{
|
||||
// if (!dic_fairy[_IsEnemy].ContainsKey(fairyid))
|
||||
// {
|
||||
// var table = table_fairy.Ins.Get_Data(fairyid);
|
||||
// var fairy = DSUtil.Get_Clone<Actor>(Get_ModelPrefabPath(eItem.Fairy, table.Prefab), transform, null, table.Scale * Vector3.one);
|
||||
// dic_fairy[_IsEnemy].Add(fairyid, fairy);
|
||||
// }
|
||||
// dic_fairy[_IsEnemy][fairyid].Set(_IsEnemy, sdata, fairyid, true);
|
||||
//}
|
||||
|
||||
//// 전투 NPC
|
||||
//for (int i = 0; i < list_BattleNPC[_IsEnemy].Count; i++)
|
||||
//{
|
||||
// if (list_BattleNPC[_IsEnemy][i].IsActiveNPC())
|
||||
// {
|
||||
// dic_actor[_IsEnemy].Add(list_BattleNPC[_IsEnemy][i]);
|
||||
// list_BattleNPC[_IsEnemy][i].Set(false, sdata, 0, true);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
public void Make_Pet(bool _IsEnemy, ServerData sdata, Actor pc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,9 +55,8 @@ public class RealCamera : MyCoroutine
|
|||
}
|
||||
|
||||
public bool IsEnter() { return CamStatus == 0; }
|
||||
public void Set_Target(Transform _target, float _camrot)
|
||||
public void Set_Target(Transform _target)
|
||||
{
|
||||
CamStatus = 0;
|
||||
target = _target;
|
||||
isTarget = target;
|
||||
if (isTarget)
|
||||
|
|
@ -65,6 +64,11 @@ public class RealCamera : MyCoroutine
|
|||
m_Target = target.GetComponent<Actor>();
|
||||
Add_CamActionTarget(_target);
|
||||
}
|
||||
}
|
||||
public void Set_Target(Transform _target, float _camrot)
|
||||
{
|
||||
Set_Target(_target);
|
||||
CamStatus = 0;
|
||||
rotateAround = _camrot;
|
||||
Set_DistanceUp(false);
|
||||
VerticalAxis = maxDistance = OrimaxDistance;
|
||||
|
|
|
|||
Loading…
Reference in New Issue