public static object GetComponent(object This, ScriptObjectLink objLink, object[] parameters) { if (TypeContract.Ensure(parameters, new[] { typeof(string) })) { var wrapper = (EntityWrapper)This; var entity = wrapper.GetEntity(); var component = new EntityComponentWrapper { parent = wrapper, id = parameters[0] as string }; return(component); } return(NetUndefined.Instance); }
public static object GetComponent(object This, ScriptObjectLink objLink, object[] parameters) { if (TypeContract.Ensure(parameters, new[] { typeof(string) })) { var wrapper = (EntityWrapper)This; var entity = wrapper.GetEntity(); var component = new EntityComponentWrapper { parent = wrapper, id = parameters[0] as string }; return component; } return NetUndefined.Instance; }