public DefaultWorldPool(int argSize, int argContainerSize) { args = new object[] { this }; pcstack = new MutableStack <Contact, PolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); ccstack = new MutableStack <Contact, CircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); cpstack = new MutableStack <Contact, PolygonAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); ecstack = new MutableStack <Contact, EdgeAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); epstack = new MutableStack <Contact, EdgeAndPolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); chcstack = new MutableStack <Contact, ChainAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); chpstack = new MutableStack <Contact, ChainAndPolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); vecs = new OrderedStack <Vec2>(argSize, argContainerSize); vec3s = new OrderedStack <Vec3>(argSize, argContainerSize); mats = new OrderedStack <Mat22>(argSize, argContainerSize); aabbs = new OrderedStack <AABB>(argSize, argContainerSize); rots = new OrderedStack <Rot>(argSize, argContainerSize); mat33s = new OrderedStack <Mat33>(argSize, argContainerSize); dist = new Distance(); collision = new Collision.Collision(this); toi = new TimeOfImpact(this); }
public override void HandleCollision(Collision.Collision collision, Game1 game) { Sprite?.HandleCollision(collision, game); }
public DefaultWorldPool(int argSize, int argContainerSize) { args = new object[] { this }; pcstack = new MutableStack<Contact, PolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); ccstack = new MutableStack<Contact, CircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); cpstack = new MutableStack<Contact, PolygonAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); ecstack = new MutableStack<Contact, EdgeAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); epstack = new MutableStack<Contact, EdgeAndPolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); chcstack = new MutableStack<Contact, ChainAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); chpstack = new MutableStack<Contact, ChainAndPolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args); vecs = new OrderedStack<Vec2>(argSize, argContainerSize); vec3s = new OrderedStack<Vec3>(argSize, argContainerSize); mats = new OrderedStack<Mat22>(argSize, argContainerSize); aabbs = new OrderedStack<AABB>(argSize, argContainerSize); rots = new OrderedStack<Rot>(argSize, argContainerSize); mat33s = new OrderedStack<Mat33>(argSize, argContainerSize); dist = new Distance(); collision = new Collision.Collision(this); toi = new TimeOfImpact(this); }
public void HandleCollision(Collision.Collision collision, Game1 game) { _collided = true; }