Пример #1
0
void Enemy::Move()
{
	switch (m_pattern)
	{
	case 0:	Move_0();	break;
	case 1:	Move_1();	break;
	case 2:	Move_2();	break;
	case 3:	Move_3();	break;
	case 4:	Move_4();	break;
	case 5:	Move_5();	break;
	case 6:	Move_6();	break;
	case 7:	Move_7();	break;
	}

	const bool& IS_HIT = Game::IsHitPlayer(hitRange, Player::HIT_RANGE, pos.x, pos.y, Game::GetPlayerPos().x, Game::GetPlayerPos().y);
	if (IS_HIT)	Damage(1);
}
bool Figura_Zawijak_Prawy::Move ( ALLEGRO_KEYBOARD_STATE &keyState , const std::vector< std::array<DataMap,10> > & Map )
{

	switch(Position)
	{
		case 0:
	
			if( Move_0 ( keyState , Map ) )
				return true ;
			break ;

		case 1:

			if( Move_1 ( keyState , Map ) )
				return true ;
			break ;
	}
	//ZWRACAMY TRUE JAK RUCH SIE UDAL A FALSE JAK NAPOTKALOSMY KOLIZJE
	return false ;
}