Esempio n. 1
0
 protected void Read(Stream stream, int version)
 {
     using (var reader = new BinaryReader(stream, Encoding.Default, leaveOpen: true))
     {
         teammask             = reader.ReadByte();;
         numPrimaryObjectives = reader.ReadInt16();
         primaryObjectives    = new PrimaryObjective[numPrimaryObjectives];
         for (int i = 0; i < numPrimaryObjectives; i++)
         {
             var thisObjective = new PrimaryObjective();
             thisObjective.id          = new VU_ID();
             thisObjective.id.num_     = reader.ReadUInt32();
             thisObjective.id.creator_ = reader.ReadUInt32();
             thisObjective.priority    = new short[8];
             for (int j = 0; j < 8; j++)
             {
                 if ((teammask & (1 << j)) > 0)
                 {
                     thisObjective.priority[j] = reader.ReadInt16();
                     thisObjective.flags       = reader.ReadByte();
                 }
             }
         }
     }
 }
Esempio n. 2
0
    public void LoadObjective(string key, int subObjectiveStep, int progressToLoad)
    {
        PrimaryObjective objectiveToLoad = objectivesDictionary[key];

        objectiveToLoad.currentSubObjective = subObjectiveStep;
        objectiveToLoad.progress            = progressToLoad;
        objectiveToLoad.ProgressChanged();

        objectiveToLoad.SetGUIPanelPrefab(CreateObjectivePanel(objectiveToLoad.hasProgress, objectiveToLoad.hasSubObjectives));
        objectiveToLoad.Activated();

        activeObjectives.Add(objectivesDictionary[key]);
    }
Esempio n. 3
0
 public void RemoveActiveObjective(PrimaryObjective toRemove)
 {
     activeObjectives.Remove(toRemove);
 }
Esempio n. 4
0
 public void Start()
 {
     primaryObjective = GetComponentInParent <PrimaryObjective>();
 }