Exemple #1
0
        public static S2VXCommand FromString(string data)
        {
            var split        = data.Split("|");
            var commandName  = split[0];
            var systemType   = Type.GetType($"S2VX.Game.Story.Command.{commandName}Command");
            var staticMethod = systemType.GetMethod("FromString", BindingFlags.Public | BindingFlags.Static);
            var command      = staticMethod.Invoke(null, new object[] { split }) as S2VXCommand;

            command.StartTime = S2VXUtils.StringToDouble(split[1]);
            command.EndTime   = S2VXUtils.StringToDouble(split[3]);
            command.Easing    = Enum.Parse <Easing>(split[5]);
            return(command);
        }