Пример #1
0
        public void UpdateBlockHandler(BlockID block)
        {
            bool nonSolid = !MCGalaxy.Blocks.CollideType.IsSolid(CollideType(block));

            deleteHandlers[block]       = BlockBehaviour.GetDeleteHandler(block, Props);
            placeHandlers[block]        = BlockBehaviour.GetPlaceHandler(block, Props);
            walkthroughHandlers[block]  = BlockBehaviour.GetWalkthroughHandler(block, Props, nonSolid);
            physicsHandlers[block]      = BlockBehaviour.GetPhysicsHandler(block, Props);
            physicsDoorsHandlers[block] = BlockBehaviour.GetPhysicsDoorsHandler(block, Props);
        }
Пример #2
0
        public void UpdateBlockHandlers(BlockID block)
        {
            bool nonSolid = !MCGalaxy.Blocks.CollideType.IsSolid(CollideType(block));

            DeleteHandlers[block]       = BlockBehaviour.GetDeleteHandler(block, Props);
            PlaceHandlers[block]        = BlockBehaviour.GetPlaceHandler(block, Props);
            WalkthroughHandlers[block]  = BlockBehaviour.GetWalkthroughHandler(block, Props, nonSolid);
            PhysicsHandlers[block]      = BlockBehaviour.GetPhysicsHandler(block, Props);
            physicsDoorsHandlers[block] = BlockBehaviour.GetPhysicsDoorsHandler(block, Props);
            OnBlockHandlersUpdatedEvent.Call(this, block);
        }
Пример #3
0
        static bool Mover(BlockProps[] scope, BlockID conv)
        {
            bool nonSolid = Block.Walkthrough(conv);

            return(BlockBehaviour.GetWalkthroughHandler(conv, scope, nonSolid) != null);
        }
Пример #4
0
        static bool Mover(byte b)
        {
            bool nonSolid = Block.Walkthrough(Block.Convert(b));

            return(BlockBehaviour.GetWalkthroughHandler(new ExtBlock(b, 0), Block.Props, nonSolid) != null);
        }