How do i animate colours only in my shapes and not everything else?
Hi i have created a game where the user clicks on the screen and where ever the user clicks triangles appear. I have created an animation whereby after the user clicks, a set of colours, green, orange cyan and cycled through 1 by 1 in the triangle. This is done with the help of a timer.
The problem i am having now is that the colours also cycle in the menue and the timer(timer is shown when the first click is pressed). I wont the colors to ONLY animate in the triangle.
Does anybody know how i can do this?
if ( m_bPing )
{
if ( m_nSeconds % 3 == 0 )
{
gc.setColor( Color.GREEN ) ;
}
elseif ( m_nSeconds % 3 == 1 )
{
gc.setColor( Color.ORANGE ) ;
}
else
{
gc.setColor(Color.CYAN);
}
}
if(m_bMouse)
{
m_Timer.start();// starts the timer from 1
m_bStart =false;
gc.drawString(" " + m_nSeconds, 7*winSize.width/8 , 7*winSize.height/10 );
for(int i = 0; i < m_nTrianglesDrawn; i++)
{
gc.fillPolygon( m_polyTriangleArr[i]);
}
}
How can i change this so that i will animate the colors in my triangle and NOT the timer and menue?

