public static LuaResult unpack(IEnumerable e) { var values = new ArrayListEx <object>(); foreach (var obj in e) { values.Add(obj); } return(new LuaResult(values)); }
/// <summary> /// Returns a list of constraints this object is an attachment of. /// </summary> /// <returns></returns> public Constraint[] GetConstraints() { lock (PhysicsSimulation.Locker) { var constraints = new ArrayListEx <Constraint>(RigidBody.NumConstraintRefs); for (int i = 0; i < RigidBody.NumConstraintRefs; i++) { var constraint = RigidBody.GetConstraintRef(i).Userobject as Constraint; constraints.Add(constraint); } return(constraints.GetArray()); } }