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