Example #1
0
void Enemy::hitBottom(JvObject* Contact,double Velocity)
{
	if(Contact==GameState::heroP){
		Hero* herop = (Hero*)Contact;
		if(herop->getStatusModel()=="man"){
			herop->dieBomb();
		}else{
			kill();
		}
		return;
	}
	JvSprite::hitBottom(Contact,Velocity);
}
Example #2
0
void Enemy::hitRight(JvObject* Contact,double Velocity)
{
	if(Contact->name =="hero"){
		Hero* herop = (Hero*)Contact;
		if(herop->getStatusModel()=="man"){
			herop->dieBomb();
		}else{
			kill();
		}
		return;
	}
   velocity.x=-velocity.x;
}
Example #3
0
void Enemy::hitTop(JvObject* Contact,double Velocity)
{
	if(Contact->name =="hero"){
		Hero* herop = (Hero*)Contact;
		if(herop->getStatusModel()=="man"){
			herop->dieBomb();
		}else{
			kill();
		}
		return;
	}
	JvSprite::hitTop(Contact,Velocity);
}