public void Unserialize(UndertaleReader reader) { Type = (UndertaleExtensionVarType)reader.ReadUInt32(); }
public UndertaleExtensionFunctionArg() { Type = UndertaleExtensionVarType.Double; }
public UndertaleExtensionFunctionArg(UndertaleExtensionVarType type) { Type = type; }
public static UndertaleExtensionFunction DefineExtensionFunction(this IList <UndertaleExtensionFunction> extfuncs, IList <UndertaleFunction> funcs, IList <UndertaleString> strg, uint id, uint kind, string name, UndertaleExtensionVarType rettype, string extname, params UndertaleExtensionVarType[] args) { var func = new UndertaleExtensionFunction() { ID = id, Name = strg.MakeString(name), ExtName = strg.MakeString(extname), Kind = kind, RetType = rettype }; foreach (var a in args) { func.Arguments.Add(new UndertaleExtensionFunctionArg() { Type = a }); } extfuncs.Add(func); funcs.EnsureDefined(name, strg); return(func); }