コード例 #1
0
    public void Judge(bool b)
    {
        List <int> a = new List <int>();

        getData = GameObject.Find("Core").GetComponent <MatchDataManager>();
        WarZoneManager warZoneManager = new WarZoneManager();

        //获取所有友方战区
        for (int i = 0; i < 9; i++)
        {
            if (getData.matchData.warZone[i].own == 0)
            {
                a.Add(i);
            }
        }
        warZoneManager.WarZoneSetActive(a, b);
        isRead = true;
    }
コード例 #2
0
    /// <summary>
    /// 判断可选位置
    /// </summary>
    /// <param name="b">开启or关闭</param>
    void Judge(bool b)
    {
        rangeSearch = GameObject.Find("Model").GetComponent <MyRangeSearch>();
        WarZoneManager warZoneManager = new WarZoneManager();

        getData = GameObject.Find("Core").GetComponent <MatchDataManager>();
        //扩散性位置搜索方法
        {
            List <int> a = rangeSearch.RangeSearch(
                int.Parse(this.transform.parent.parent.name),
                int.Parse(this.transform.parent.name),
                0,
                getData.matchData.
                warZone[int.Parse(this.transform.parent.parent.name)].
                grid[int.Parse(this.transform.parent.name)].chr.rp);
            warZoneManager.WarZoneSetActive(a, b);
        }
    }