using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using TableConfig;
|
|
public class BossFakeLineUtility : Singleton<BossFakeLineUtility>
|
{
|
int m_MakeFakeLineTimes = 0;
|
public int makeFakeLineTimes
|
{
|
get { return m_MakeFakeLineTimes; }
|
set { m_MakeFakeLineTimes = Mathf.Clamp(value, 0, int.MaxValue); }
|
}
|
|
bool m_ShowFakeLine = false;
|
public bool showFakeLine
|
{
|
get { return m_ShowFakeLine; }
|
set { m_ShowFakeLine = value; }
|
}
|
|
//这个值在初见boss和最后看见boss的时候记录,其值为time.time+1分钟,这段时间内告诉玩家其所在分线的boss的死亡情况,否则告诉玩家公共boss的死亡情况。
|
public uint lastBossNpcID;
|
public float inMistakeForBossAliveOverTime = 0f;
|
|
public bool IsShuntBoss(int _bossId)
|
{
|
if (TimeUtility.OpenDay > GeneralConfig.Instance.bossShuntDays)
|
{
|
return false;
|
}
|
else
|
{
|
GAStaticDefine.NPCLocation location;
|
var find = GAStaticDefine.TryGetMapNPCLocation(_bossId, out location);
|
return find && GeneralConfig.Instance.bossShuntMaps.Contains(location.mapId);
|
}
|
}
|
|
public bool IsBossVisible(int _bossId)
|
{
|
if (PlayerDatas.Instance.hero == null)
|
{
|
return false;
|
}
|
else
|
{
|
return GAMgr.Instance.GetCloserNPC(PlayerDatas.Instance.hero.Pos, _bossId) != null;
|
}
|
}
|
|
public bool IsBossTombstoneVisble(int _bossId)
|
{
|
if (PlayerDatas.Instance.hero == null)
|
{
|
return false;
|
}
|
else
|
{
|
var bossInfoConfig = Config.Instance.Get<BossInfoConfig>(_bossId);
|
var tombstoneId = bossInfoConfig.StoneNPCID;
|
return GAMgr.Instance.GetCloserNPC(PlayerDatas.Instance.hero.Pos, tombstoneId) != null;
|
}
|
}
|
|
|
}
|