少年修仙传客户端代码仓库
client_Zxw
2018-09-19 ab3e936c7be0fdcc6c814cc0cb0e4c88a0f346eb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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;
        }
    }
 
 
}