CBulletNinja::CBulletNinja(int id, int typeID, CSprite spriteBullet, int dame, float v0, D3DXVECTOR2 beginPosition, float angleFly, int x, int y) :CBullet(id, typeID, spriteBullet, dame, D3DXVECTOR2(v0*cosf(angleFly), v0*sinf(angleFly)), beginPosition) { _position.x = x; _position.y = y; _state = BULLET_BASE_STATE::FLYING; Initlize(); UpdateBox(); }
CEnemyInk::CEnemyInk(int kindInk) :CEnemy() { _dame = DAME_ENEMY_INK; _PositionRockMan = D3DXVECTOR2(100, 100); if (kindInk == 0) { _kindInk = ID_SPRITE_ENEMY_INK_RED; } else { _kindInk = ID_SPRITE_ENEMY_INK_BLUE; } Initlize(); _blood = 1; _score = SCORE_DEFAULT; }
void ToastEngine::run() { g_config = new (std::nothrow)toast::SystemConfig; LoadConfig(Daemon::Instance()->config); int lastTime = time(NULL); // initlize global varables Initlize(); // Create agent response thread; g_agent_response_threads = MultiWorkQueueThreadPool::Create(g_config->num_response_process_threads, NULL); CreateFunctionalThreads(); Log::Debug("All the thread created " ); while(false==Daemon::Instance()->IsStop()) { int now = time(NULL); usleep(1000000); } KillThreads(m_OtherThreadPool); }