public static InstructionSave FromInstructionBlueprint(FlatRedBall.Instructions.InstructionBlueprint template) { InstructionSave toReturn = new InstructionSave(); toReturn.SetValuesFromTemplate(template); return(toReturn); }
public static InstructionSave FromInstruction(FlatRedBall.Instructions.GenericInstruction instruction) { InstructionSave instructionSaveToReturn = new InstructionSave(); instructionSaveToReturn.SetValuesFromInstruction(instruction); return(instructionSaveToReturn); }
public static InstructionBlueprintListSave FromInstructionBlueprintList(InstructionBlueprintList InstructionBlueprintList) { InstructionBlueprintListSave itls = new InstructionBlueprintListSave(); foreach (InstructionBlueprint template in InstructionBlueprintList) { itls.Instructions.Add(InstructionSave.FromInstructionBlueprint(template)); } return(itls); }
public void AddList(InstructionList list) { KeyframeSave keyframe = new KeyframeSave(); foreach (Instruction instruction in list) { if (instruction is GenericInstruction) { GenericInstruction asGenericInstruction = instruction as GenericInstruction; InstructionSave instructionSave = InstructionSave.FromInstruction(asGenericInstruction); keyframe.InstructionSaves.Add(instructionSave); } else { throw new NotImplementedException("This list contains a type of instruction that cannot be saved."); } } keyframe.Name = list.Name; SceneKeyframes.Add(keyframe); }