public ExecutionInfo(Battlefield battlefield, GameObjective objective, int halfTurnsElapsed, BattleLoopStage battleStage, bool afterVictoryImage) { this.battlefield = battlefield; this.objective = objective; this.halfTurnsElapsed = halfTurnsElapsed; this.battleStage = battleStage; this.afterVictoryImage = afterVictoryImage; }
public int GetCurrentCollectedAmountForObjective(GameObjective objective) { if (_ObjectiveCurrentAmountMap.ContainsKey(objective)) { return _ObjectiveCurrentAmountMap[objective]; } return -1; }
public void ObjectiveUpdate(GameObjective o) { for (int i = 0; i < ObjectivesList.Count; i++) { if (ObjectivesList[i].iD == o.iD) { ObjectivesList[i].status = o.status; } } }
public Status_GameObjective GameObjectiveCheckIn(GameObjective o) { for (int i = 0; i < ObjectivesList.Count; i++) { if (ObjectivesList[i].iD == o.iD) { return(ObjectivesList[i].status); } } // Runs if does not exist ObjectivesList.Add(o); return(Status_GameObjective.Initialized); }
private void _MakeObj(Type_GameObjective t, string i, string l, string d, string s) { if (t == Type_GameObjective.InteractDiscrete) { _myObjv = new InteractDiscrete_GameObjective(i, l, d); } else if (t == Type_GameObjective.InteractOver) { _myObjv = new InteractOver_GameObjective(i, l, d); } else if (t == Type_GameObjective.InteractOver_Sub) { _myObjv = new InteractOver_Sub_GameObjective(i, l, d, s); } }
void IGameObjectivesAmountChangedReceiver.NotifyObjectiveCollectedAmountChanged(GameObjective objective, int newAmount) { if (_ObjectiveCurrentAmountMap.ContainsKey(objective)) { _ObjectiveCurrentAmountMap[objective] = newAmount; } else Debug.LogError($"{objective} not present in dictionary!"); }
void Start() { _gameObjective = GetComponent <GameObjective>(); }
void Awake() { Instance = this; _enemies = new List <GameObject>(); InitialLoadOfEnemies(); }
public GameObjectiveEvent(GameObjective o) { GObjv = o; }
public void HandleOnWaypointsChanged() { //find the first objective that is not complete and set to current //note: here we could look for first incomplete with a particular priority etc currentObjective = objectiveList.FirstOrDefault(objective => !objective.IsCompleted); }