Ejemplo n.º 1
0
    /// <summary>
    /// Adds empty data to an objective path. Used for creating new sub objectives.
    /// </summary>
    private void AddEmptyDataToObjectivePath()
    {
        SubObjective tempSubObjective = ScriptableObject.CreateInstance <SubObjective>();

        tempSubObjective.Initialize();
        nodeCanvas.objectivePaths[objectivePathIndex].objectives.Add(tempSubObjective);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Helper function for swapping sub objectives. Used when moving objectives up and down.
    /// </summary>
    /// <param name="index">First index</param>
    /// <param name="newIndex">Index to swap first index to. </param>
    private void SwapSubObjective(int index, int newIndex)
    {
        SubObjective temp = nodeCanvas.objectivePaths[objectivePathIndex].objectives[index];

        nodeCanvas.objectivePaths[objectivePathIndex].objectives[index]    = nodeCanvas.objectivePaths[objectivePathIndex].objectives[newIndex];
        nodeCanvas.objectivePaths[objectivePathIndex].objectives[newIndex] = temp;
    }
Ejemplo n.º 3
0
 protected void SubObjectiveClear()
 {
     mainObjectiveDelayed = false;
     subobjectivePosition = Vector3.zero;
     subObjective = SubObjective.none;
     blockadeToDestroy = null;
 }