コード例 #1
0
 /// <summary>
 /// 游戏初始化主逻辑
 /// </summary>
 void Start()
 {
     //战局数据
     getData = GameObject.Find("Core").GetComponent <MatchDataManager>();
     //生成控制节点
     CreateInfo();
     //读取双方玩家卡组
     GetCards();
 }
コード例 #2
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;
    }
コード例 #3
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);
        }
    }
コード例 #4
0
 void MyGetcomponent()
 {
     action = GameObject.Find("Model").GetComponent <Action>();
     //获取战局Core数据
     getData = GameObject.Find("Core").GetComponent <MatchDataManager>();
 }
コード例 #5
0
 void Start()
 {
     //获取战局Core数据
     getData = GameObject.Find("Core").GetComponent <MatchDataManager>();
 }