void SpaceShipBeam::Render(IRenderer& renderer)
{
	float r = m_collisionPoly.GetCircle().r * 2.0f;

	glm::mat4 T = glm::translate(glm::vec3(m_pos.x,m_pos.y,-100.0f));

	unsigned int tile = m_animation.GetTile();

	renderer.DrawSprite("weapon",glm::scale(T,glm::vec3(r,r,1.0f)),glm::vec4(1.0f),glm::vec2(1.0f),tile);
}
Beispiel #2
0
	void Slider::Render(IRenderer& renderer)
	{
		glm::vec3 line[2] =
		{
			glm::vec3(m_start.x,m_start.y,0.0f),
			glm::vec3(m_end.x,m_end.y,0.0f)
		};

		glm::mat4 T = glm::translate(glm::vec3(m_pos.x,m_pos.y,0.0f));
		T = glm::scale(T,glm::vec3(60.0f,40.0f,1.0f));

		std::stringstream stream;
		stream << m_text << ": ";
		stream.precision(m_iPrecision);
		stream << std::fixed << m_fPercentage << std::endl;

		renderer.SetRenderSpace(RenderSpace::Screen);

		renderer.DrawSprite(m_SpriteTexture,T);
		renderer.DrawLine(line,2);
		renderer.DrawString(stream.str().c_str(),glm::vec3(m_start.x,m_end.y - 10.0f,0.0f));

	}