public GameInfo(ReceiveInfo info) { GodB = new List <Point>(); EnemyTanks = new List <TankInfo>(); Fogs = new List <Point>(); SharedResources.AttTank = null; SourceInfo = info; NextPoint.Clear(); FillTanks(); }
private void setPoint() { if (this.point.GetComponent("NextPoint") != null) // maybe move towards something besides a point? { NextPoint currentNextPoint = this.point.GetComponent("NextPoint") as NextPoint; if (currentNextPoint.nextPoint == null) { Destroy(gameObject); } this.point = currentNextPoint.nextPoint; } else { Destroy(gameObject); } }
/// <summary> /// instantiates gameplay option (buttons) for possible next plot points /// </summary> /// <param name="info">information needed for gameplay option instantiation</param> private void InstantiateDecision(NextPoint info) { if ((player == null || player.StatsCheckOut(info.strRequirement, info.dexRequirement, info.intRequirement, info.fthRequirement, info.lckRequirement)) && !info.IsBlocked(pathPlayerTook)) { if (info.changeChapter) { Instantiate(decisionPrefab, decisionsPanel.transform). Init(info.description, info.nextSituationID, info.conditionDistance, info.nextChapter, info.startSituation); } else { Instantiate(decisionPrefab, decisionsPanel.transform). Init(info.description, info.nextSituationID, info.conditionDistance); } } }
//最終影響マップ生成 private void Mapping() { _next = position => new List <Vector2Int>() { Vector2Int.right, Vector2Int.up, Vector2Int.left, Vector2Int.down } .Select(v => v + position).Where(v => _passableMap.WithinMapRange(v)).Where(v => _passableMap[v]); List <Vector2Int> path = SearchAlgorithm.PathFind(mapRange, enemyPos, itemPos, _next); foreach (var dir in path) { Debug.Log(dir); } // influenceMap.MatrixOperate((xcount, ycount) => // { // if (terrains[xcount, ycount].GetComponent<Renderer>().material.color != Color.gray) // { // terrains[xcount, ycount].GetComponent<Renderer>().material.color = new Color(map[xcount, ycount], 0, 0); // terrains[xcount, ycount].transform.GetChild(0).GetChild(0).GetComponent<Text>().text = map[xcount, ycount].ToString("f3"); // } // }); }
private void _currentPoint_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { Set(ref _currentPoint, _currentPoint); NextPoint.RaiseCanExecuteChanged(); PrevPoint.RaiseCanExecuteChanged(); }