我想在目标 c 上编写这段代码:
bool BordVertical::collisionwith( Jeu& jeu, ElementJeu& element )
{
// Verify if the element is balle ype
Balle* balle = dynamic_cast<Balle*>( &element ) ;
if( balle )
{
balle->Vx( -balle->Vx() ) ;
return true ;
}
return false ;
}
ball 是 ElementJeu 的子类... obj-c 中是否存在类似的东西?
谢谢