Пример #1
0
        protected ThnEvent(LuaTable table)
        {
            Time = (float)table[0];
            Type = ThnTypes.Convert <EventTypes>(table[1]);
            if (GetProps(table, out var props))
            {
                if (GetValue(props, "param_curve", out LuaTable pcurve))
                {
                    ParamCurve = new ParameterCurve(pcurve);
                    GetValue(props, "pcurve_period", out ParamCurve.Period);
                }
                GetValue(props, "duration", out Duration);
            }
            var targetTable = (LuaTable)table[2];

            Targets = new string[targetTable.Count];
            for (int i = 0; i < Targets.Length; i++)
            {
                Targets[i] = (string)targetTable[i];
            }
        }