Example #1
0
 public void Init(StepData _data, SavableStep step, System.Action _onFinish)
 {
     data            = _data;
     collected       = step.collected;
     killed          = step.killed;
     isDone          = step.isDone;
     onFinishAction += _onFinish;
 }
Example #2
0
    public SavableQuest ToSavableData()
    {
        SavableQuest toSave = new SavableQuest();

        toSave.questName        = data.questName;
        toSave.currentStepIndex = currentStepIndex;
        toSave.steps            = new List <SavableStep>();
        for (int i = 0; i < stepList.Count; i++)
        {
            SavableStep step = new SavableStep();
            step.stepIndex = i;
            step.collected = stepList[i].collected;
            step.killed    = stepList[i].killed;
            step.isDone    = stepList[i].isDone;
            toSave.steps.Add(step);
        }
        return(toSave);
    }