import React from 'react' ; import { ArcadeImage , ArcadeImageProps , ArcadeCollider , } from 'react-phaser-fiber' ; export interface BlockProps extends Omit < ArcadeImageProps , 'texture' > { onBallHit : ( ) => any ; } function Block ( { onBallHit , ... props } , ref ) { return ( < ArcadeImage ref = { ref } texture = "assets" immovable physicsType = "static" { ... props } > < ArcadeCollider with = "ball" onCollide = { ( ) => onBallHit ( ) } /> < /ArcadeImage>); } export default React . forwardRef ( Block ) ;