35 #include "Core-Level-JR.h"
37 laFinal::laFinal(
void)
39 _ttFinishFx.parameters(4);
40 _ttFinishFx.enable(M_FALSE);
46 laFinal::~laFinal(
void)
50 void laFinal::animate(laTimer &t)
53 laPlayer* p = getLevelObject()->getPlayer();
58 if(_ttFinishFx.isEnabled() && (_ttFinishFx.timeRemaining()<=_ttFinishFx.getElapseTime()/3) )
60 _ttFinishFx.enable(M_FALSE);
62 getLevelObject()->forceCompleted();
66 if(getLevelObject()->isCompleted() && (!_ttFinishFx.isEnabled()))
71 if(_ttFinishFx.isEnabled())
72 getLevelObject()->zoom( getLevelObject()->zoom() + 0.5*t.delta());
74 _ttFinishFx.animate(t);
75 laCollectable::animate(t);
80 M_BOOL laFinal::_collect_actions()
83 p->enableBattleZoom(M_FALSE);
85 _ttFinishFx.enable(M_TRUE);
87 return laCollectable::_collect_actions();
92 void laFinal::drawInterface(
laRenderer *r, laPoint3 ptBasePos)
94 laSettings* ps = laSystemIntegrator::getSettings();
95 double w = ps->graphics_resolution_w;
96 double h = ps->graphics_resolution_h;
99 if( getLevelObject()->isCompleted() || _ttFinishFx.isEnabled())
101 alpha = 255-255*( _ttFinishFx.reminder() );
104 r->styleSet(laColor(220,210,210, (
unsigned char)alpha));
105 r->drawRect(laPoint3(), laPoint3(ps->graphics_resolution_w, ps->graphics_resolution_h),
laPoint2(),
laPoint2());
108 r->
font(
"deco")->ctlSize(70);
110 r->styleSet(laColor(255,255,255,255));
111 r->
font(
"deco")->draw(ptBasePos+laPoint3(w/2, h/3),
"Level Completed");
113 if( !_ttFinishFx.isEnabled())
115 r->styleSet(laColor(255,255,255,200));
117 r->
font(
"deco")->ctlSize(25);
118 r->
font(
"deco")->draw(ptBasePos+laPoint3(w/2, h/3+80),
"press enter to continue...");
122 laCollectable::drawInterface(r, ptBasePos);
laFont * font(char *strName)
Get a font renderer.
virtual void modeTexture(M_BOOL bOn)=0
Enable/disable texturing.
#define M_AC
Text align center.
Virtual interface for the Engine graphics renderer.