Example #1
0
	void CPlayer::draw()
	{
		drawPivot();
		if(dead && !hexagonGame.getStatus().drawing3D) drawDeathEffect();

		Color colorMain{!dead || hexagonGame.getStatus().drawing3D ? hexagonGame.getColorMain() : getColorFromHue(hue / 255.0f)};

		pLeft = getOrbitFromDegrees(pos, angle - 100, size + 3);
		pRight = getOrbitFromDegrees(pos, angle + 100, size + 3);

		vertices[0].position = getOrbitFromDegrees(pos, angle, size);
		vertices[1].position = pLeft;
		vertices[2].position = pRight;

		for(int i{0}; i < 3; ++i) vertices[i].color = colorMain;

		hexagonGame.render(vertices);
	}
Example #2
0
	void CPlayer::draw()
	{
		drawPivot();
		const auto& isDrawing3D(hexagonGame.getStatus().drawing3D);

		if(!isDrawing3D && deadEffectTimer.isRunning()) drawDeathEffect();

		Color colorMain{!dead || isDrawing3D ? hexagonGame.getColorMain() : getColorFromHue(hue / 255.f)};

		pLeft = getOrbitFromDegrees(pos, angle - 100, size + 3);
		pRight = getOrbitFromDegrees(pos, angle + 100, size + 3);

		vertices[0].position = getOrbitFromDegrees(pos, angle, size);
		vertices[1].position = pLeft;
		vertices[2].position = pRight;

		if(!swapTimer.isRunning() && !isDrawing3D) colorMain = getColorFromHue((swapBlinkTimer.getCurrent() * 15) / 255.f);
		for(int i{0}; i < 3; ++i) vertices[i].color = colorMain;

		hexagonGame.render(vertices);
	}
Example #3
0
	void CPlayer::draw()
	{
		drawPivot();

		Color colorMain{hgPtr->getColorMain()};

		if(isDead) colorMain = getColorFromHue(hue / 255.0f);

		pLeft = getOrbit(pos, angle - 100, size + 3);
		pRight = getOrbit(pos, angle + 100, size + 3);

		vertices[0].position = getOrbit(pos, angle, size);
		vertices[1].position = pLeft;
		vertices[2].position = pRight;

		vertices[0].color = colorMain;
		vertices[1].color = colorMain;
		vertices[2].color = colorMain;

		hgPtr->drawOnTexture(vertices);
	}