Skip to content

Instantly share code, notes, and snippets.

(function () {
function getBodyAtXY(world, x, y, includeStatic) {
var pos = new b2Vec2();
pos.Set(x, y);
var aabb = new b2AABB();
aabb.lowerBound.Set(x - 0.001, y - 0.001);
aabb.upperBound.Set(x + 0.001, y + 0.001);
var maxShapes = 10;
var shapes = [];
var count = world.Query(aabb, shapes, maxShapes);
namespace ConsoleTest
{
using System;
using System.Collections;
using System.Collections.Generic;
internal class Program
{
#region Methods: private
internal static class AssemblyExtension
{
#region Methods: public
public static object CreateInstance(this Assembly self, string typeName, params object[] args)
{
try
{
return Activator.CreateInstance(self.GetType(typeName, true), args, null);
}