示例#1
0
 public HiddenBlockSprite(int posX, int posY, HiddenBlockType type)
 {
     Location    = new Vector2(posX, posY);
     WidthHeight = new Vector2(BlockSpriteFactory.BLOCK_WIDTH, BlockSpriteFactory.BLOCK_HEIGHT);
     Boundary    = new Rectangle((int)Location.X, (int)Location.Y, (int)WidthHeight.X, (int)WidthHeight.Y);
     //this.type = type;
     currentFrame = BlockSpriteFactory.HiddenBlock(type);
     EntityType   = TileMapInterpreter.Entities.HIDDEN_HIDDEN;
 }
示例#2
0
        public static Rectangle HiddenBlock(HiddenBlockType type)
        {
            switch (type)
            {
            case HiddenBlockType.Hidden:
                return(new Rectangle(400, 400, 0, 0));

            case HiddenBlockType.Exposed:
                return(new Rectangle(BLOCK_WIDTH * 3, 0, BLOCK_WIDTH, BLOCK_HEIGHT));

            default:
                return(new Rectangle());
            }
        }