Exemplo n.º 1
0
        public MissionObjective CreateObjectiveFromState(ObjectiveState state, Transform parent)
        {
            GameObject       newObjectiveGameObject = parent.gameObject.CreateChild(state.Name).gameObject;
            MissionObjective newObjective           = newObjectiveGameObject.AddComponent <MissionObjective> ();

            newObjective.State    = state;
            state.ParentObjective = newObjective;
            mObjectiveLookup.Add(newObjective.State.FileName, newObjective);
            return(newObjective);
        }
Exemplo n.º 2
0
        public bool GetObjectiveState(string objectiveName, out ObjectiveState objectiveState)
        {
            objectiveState = null;
            MissionObjective objective = null;

            if (mObjectiveLookup.TryGetValue(objectiveName, out objective))
            {
                objectiveState = objective.State;
            }
            return(objectiveState != null);
        }