J :
* Use dt for the hand opening animation.
This commit is contained in:
@@ -69,6 +69,7 @@ class GuiHandSelf : public GuiHand
|
|||||||
|
|
||||||
bool CheckUserInput(u32 key);
|
bool CheckUserInput(u32 key);
|
||||||
virtual void Render();
|
virtual void Render();
|
||||||
|
void Update(float dt);
|
||||||
float LeftBoundary();
|
float LeftBoundary();
|
||||||
|
|
||||||
HandLimitor* limitor;
|
HandLimitor* limitor;
|
||||||
|
|||||||
@@ -82,11 +82,19 @@ bool GuiHandSelf::CheckUserInput(u32 key)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GuiHandSelf::Update(float dt)
|
||||||
|
{
|
||||||
|
if (Closed == state)
|
||||||
|
backpos += 10 * dt * (ClosedX - backpos);
|
||||||
|
else
|
||||||
|
backpos += 10 * dt * (OpenX - backpos);
|
||||||
|
GuiHand::Update(dt);
|
||||||
|
}
|
||||||
|
|
||||||
void GuiHandSelf::Render()
|
void GuiHandSelf::Render()
|
||||||
{
|
{
|
||||||
if (Closed == state)
|
if (Closed == state)
|
||||||
{
|
{
|
||||||
backpos += (ClosedX - backpos) / 100;
|
|
||||||
JRenderer::GetInstance()->RenderQuad(back, backpos, SCREEN_HEIGHT - 250);
|
JRenderer::GetInstance()->RenderQuad(back, backpos, SCREEN_HEIGHT - 250);
|
||||||
float y = 48.0;
|
float y = 48.0;
|
||||||
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
|
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
|
||||||
@@ -99,7 +107,6 @@ void GuiHandSelf::Render()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
backpos += (OpenX - backpos) / 100;
|
|
||||||
JRenderer::GetInstance()->RenderQuad(back, backpos, SCREEN_HEIGHT - 250);
|
JRenderer::GetInstance()->RenderQuad(back, backpos, SCREEN_HEIGHT - 250);
|
||||||
bool flip = false;
|
bool flip = false;
|
||||||
float y = 48.0;
|
float y = 48.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user