//============================================================================= void TitleUnit::calc() { _bg.calc(); static const float COIN_POS_X_TH_MAX = 200 * Screen::RATIO; static const float COIN_POS_X_TH_MIN = -10 * Screen::RATIO; static const float COIN_FALL_SPEED = 4 * Screen::RATIO; static const float COIN_FALL_MAX_Y = 282 * Screen::RATIO; static const float COIN_AUTO_MOVE_X_SPEED = 160.0f * Screen::RATIO; Math::Vector3 coinpos = _coinModel->GetPosition(); if (coinpos.y < COIN_FALL_MAX_Y) coinpos.y += COIN_FALL_SPEED; if (_coinCounter == 0) coinpos.x -= (coinpos.x - COIN_AUTO_MOVE_X_SPEED) * 0.03f; else { if (abs(_coinSpeed) > 1.0f) { _coinSpeed -= _coinSpeed * 0.1f; } else { _coinSpeed = 0; } coinpos.x += _coinSpeed; } _coinModel->SetPosition(coinpos); _coinModel->SetRotation(Math::Vector3(0, 0, (coinpos.x - COIN_AUTO_MOVE_X_SPEED) * 2.0f)); LOGI("titleUnit, x=%3.3f", coinpos.x); if (coinpos.x > COIN_POS_X_TH_MAX) { SetEnd(true); SetNextID(UNIT_PUZZLE_NO_TIMELIMIT); } else if (coinpos.x < COIN_POS_X_TH_MIN) { SetEnd(true); SetNextID(UNIT_PUZZLE); } if (!_coinTouched && _coinCounter > 0) _coinCounter--; }
AHTMODEL::AHTMODEL( void ) { flag = AHTMODEL_FLAG_NONE; dummy = 0; SetCur( 0, 0 ); SetPage( 0 ); SetNextID( -1 ); SetPrevID( -1 ); SetGlobalId( 0 ); obj.option1 = 0; obj.option2 = 0; obj.option3 = 0; obj.option4 = 0; prop_cnt = 0; mem_prop_size = 0; mem_prop = NULL; source = NULL; propstr = NULL; exp = NULL; stdbuf = NULL; *name = 0; *classname = 0; *author = 0; *ver = 0; *fname = 0; *fpath = 0; refprop = NULL; *icon = 0; iconid = 0; }