예제 #1
0
GameObject *  Player::GetBlockingGameObjectImmediatelyToTheRightAndBelow()
{
	GameObject * foundGameObject = 0;

	int playerRight = this->GetCollisionBox().right;
	int playerBottom = this->GetCollisionBox().bottom;

	foundGameObject = Universe::GetBlockAtPoint(playerRight + 1, playerBottom);

	if(!foundGameObject)
	{
		Bomb * foundBomb = Universe::GetBombAtPoint(playerRight + 1, playerBottom);
		if(foundBomb && !foundBomb->IsPlayerMovingOverAfterDropping(this))
		{
			foundGameObject = foundBomb;
		}

	}

	return foundGameObject;

}
예제 #2
0
GameObject *  Player::GetBlockingGameObjectImmediatelyToTheLeftAndAbove()
{
	GameObject * foundGameObject = 0;

	int playerLeft = this->GetCollisionBox().left;
	int playerTop = this->GetCollisionBox().top;

	foundGameObject = Universe::GetBlockAtPoint(playerLeft - 1, playerTop);

	if(!foundGameObject)
	{
		Bomb * foundBomb = Universe::GetBombAtPoint(playerLeft - 1, playerTop);
		if(foundBomb && !foundBomb->IsPlayerMovingOverAfterDropping(this))
		{
			foundGameObject = foundBomb;
		}

	}

	return foundGameObject;

}
예제 #3
0
GameObject *  Player::GetBlockingGameObjectImmediatelyAboveAndToTheRight()
{
	GameObject * foundGameObject = 0;

	int playerRight = this->GetCollisionBox().right;
	int playerTop = this->GetCollisionBox().top;

	foundGameObject = Universe::GetBlockAtPoint(playerRight, playerTop - 1);

	if(!foundGameObject)
	{
		Bomb * foundBomb = Universe::GetBombAtPoint(playerRight, playerTop - 1);
		if(foundBomb && !foundBomb->IsPlayerMovingOverAfterDropping(this))
		{
			foundGameObject = foundBomb;
		}

	}

	return foundGameObject;

}