Пример #1
0
        public void SetValuesFromInstruction(FlatRedBall.Instructions.GenericInstruction instruction)
        {
            Type = instruction.TypeAsString;

            if (instruction.Target is INameable)
            {
                TargetName = ((INameable)(instruction.Target)).Name;
            }
            else
            {
                throw new NotSupportedException("Attempting to save an instruction that references an object that is not INameable");
            }

            Member = instruction.Member;
            Value  = instruction.MemberValueAsObject;
            Time   = instruction.TimeToExecute;
        }