Example #1
0
        public override bool CheckGridCollision(BLOCK_SURFACE contactSurface, int tryFallThrough)
        {
            //You can only collide with the top surface, but you can fall through it if you want to
            if ((_currentState == ITEM_STATE.IN_GRID) && (contactSurface == BLOCK_SURFACE.BLOCK_TOP) && ((tryFallThrough & (1 << (int)BLOCK_SURFACE.BLOCK_TOP)) == 0))
                return true;

            return false;
        }
Example #2
0
 //Grid checks only occur when a block is occupied, so as long as the item is on the grid, default to true
 public virtual bool CheckGridCollision(BLOCK_SURFACE contactSurface, int tryFallThrough)
 {
     if (_currentState == ITEM_STATE.IN_GRID)
         return true;
     return false;
 }