Beispiel #1
0
		public override string LoadFile (string file, MoonSharp.Interpreter.Table globalContext)
		{
			file = Path.GetFileName(file.Replace('\\', '/'));

			System.Diagnostics.Debug.WriteLine ("Attempting to load " + file);

			using(Stream input = m_Assets.Open (file))
				using(StreamReader reader = new StreamReader (input))
					return reader.ReadToEnd();
		}
Beispiel #2
0
				protected override object GetValueImpl(MoonSharp.Interpreter.Script script, object obj)
				{
					return ((System.Array)(obj)).LongLength;
				}
Beispiel #3
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((MoonSharp.Interpreter.Tests.EndToEnd.UserDataEnumsTests.EnumOverloadsTestClass)(obj)).GetF();
				}
Beispiel #4
0
				protected override object GetValueImpl(MoonSharp.Interpreter.Script script, object obj)
				{
					return System.EventArgs.Empty;
				}
Beispiel #5
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return new System.EventArgs();
				}
Beispiel #6
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return MoonSharp.Interpreter.Tests.EndToEnd.UserDataEventsTests.SomeClass.Trigger_MySEvent();
				}
Beispiel #7
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass tmp = ((MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass)(obj));
					tmp.AccessOverrProp = ((int)(pars[0]));
					return null;
				}
Beispiel #8
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass.StaticProp = ((string)(pars[0]));
					return null;
				}
Beispiel #9
0
				protected override object GetValueImpl(MoonSharp.Interpreter.Script script, object obj)
				{
					return ((MoonSharp.Interpreter.Tests.EndToEnd.StructAssignmentTechnique.Vector3)(obj)).Z;
				}
Beispiel #10
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return new MoonSharp.Interpreter.Tests.EndToEnd.StructAssignmentTechnique.Vector3();
				}
Beispiel #11
0
				protected override object GetValueImpl(MoonSharp.Interpreter.Script script, object obj)
				{
					return ((MoonSharp.Interpreter.Tests.EndToEnd.StructAssignmentTechnique.Transform)(obj)).position;
				}
Beispiel #12
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((MoonSharp.Interpreter.Tests.EndToEnd.ProxyObjectsTests.Proxy)(obj)).GetValue();
				}
Beispiel #13
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((MoonSharp.Interpreter.Tests.EndToEnd.MetatableTests.MyObject)(obj)).GetSomething();
				}
Beispiel #14
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return new MoonSharp.Interpreter.Tests.EndToEnd.MetatableTests.MyObject();
				}
Beispiel #15
0
				protected override object GetValueImpl(MoonSharp.Interpreter.Script script, object obj)
				{
					return ((System.Array)(obj)).IsSynchronized;
				}
Beispiel #16
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return new MoonSharp.Interpreter.Tests.EndToEnd.UserDataNestedTypesTests.VSomeType();
				}
Beispiel #17
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					((System.Collections.Generic.List<int>)(obj)).ForEach(((System.Action<int>)(pars[0])));
					return MoonSharp.Interpreter.DynValue.Void;
				}
Beispiel #18
0
				protected override void SetValueImpl(MoonSharp.Interpreter.Script script, object obj, object value)
				{
					MoonSharp.Interpreter.Tests.EndToEnd.StructAssignmentTechnique.Vector3 tmp = ((MoonSharp.Interpreter.Tests.EndToEnd.StructAssignmentTechnique.Vector3)(obj));
					tmp.Z = ((float)(value));
				}
Beispiel #19
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass)(obj)).GetWoIntProp2();
				}
Beispiel #20
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					throw new System.InvalidOperationException("Access to event special methods is not supported by hardwired decriptors.");
				}
Beispiel #21
0
				protected override void SetValueImpl(MoonSharp.Interpreter.Script script, object obj, object value)
				{
					MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass tmp = ((MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass)(obj));
					tmp.WoIntProp2 = ((int)(value));
				}
Beispiel #22
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((System.Collections.Generic.List<int>)(obj)).GetRange(((int)(pars[0])), ((int)(pars[1])));
				}
Beispiel #23
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((System.Collections.Generic.List<int>)(obj)).FindLastIndex(((System.Predicate<int>)(pars[0])));
				}
Beispiel #24
0
				protected override void SetValueImpl(MoonSharp.Interpreter.Script script, object obj, object value)
				{
					MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass.StaticProp = ((string)(value));
				}
Beispiel #25
0
				protected override object GetValueImpl(MoonSharp.Interpreter.Script script, object obj)
				{
					return ((MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass)(obj)).RoIntProp2;
				}
Beispiel #26
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((object)(obj)).GetType();
				}
Beispiel #27
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((System.ValueType)(obj)).ToString();
				}
Beispiel #28
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((System.ValueType)(obj)).Equals(((object)(pars[0])));
				}
Beispiel #29
0
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return ((System.Collections.Generic.List<int>)(obj)).GetEnumerator();
				}
Beispiel #30
-1
				protected override object Invoke(MoonSharp.Interpreter.Script script, object obj, object[] pars, int argscount)
				{
					return MoonSharp.Interpreter.Tests.EndToEnd.VtUserDataPropertiesTests.SomeClass.Numbers;
				}