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);
        }
Esempio n. 2
0
 public override void HandleCollision(Collision.Collision collision, Game1 game)
 {
     Sprite?.HandleCollision(collision, game);
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public void HandleCollision(Collision.Collision collision, Game1 game)
 {
     _collided = true;
 }