Ejemplo n.º 1
0
void Title::update( Controller::NoState::SceneName* next_scene_name,
                    Constants::PlayMode* play_mode)
{
    const Constants::PlayMode modes[]
    = {Constants::PlayMode1P, Constants::PlayMode2P};

    GameLib::Framework f = GameLib::Framework::instance();

    ::Game::InputManager user1_input = ::Game::InputManager::user1();

    if (user1_input.is_option())
    {
        *next_scene_name = Controller::NoState::SceneGame;
        *play_mode = modes[looped_index_];
    }
    else if (user1_input.is_top_triggered())
    {
        ++looped_index_;
    }
    else if (user1_input.is_bottom_triggered())
    {
        --looped_index_;
    }

    f.drawDebugString(0, 0, "[TITLE]", 0xffffffff);
    f.drawDebugString(1, 1, "1P Mode", 0xffffffff);
    f.drawDebugString(1, 2, "2P Mode", 0xffffffff);
    f.drawDebugString(0, looped_index_ + 1, ">", 0xffffffff);
}
Ejemplo n.º 2
0
void Success::update(State* state, Controller::Game::SceneName* next_scene_name)
{
    GameLib::Framework f = GameLib::Framework::instance();
    ::Game::InputManager user1_input = ::Game::InputManager::user1();

    if (user1_input.is_option())
    {
        *next_scene_name = Controller::Game::SceneNoStateEnding;
    }

    f.drawDebugString(0, 0, "SUCCESS!!!", 0xffffffff);
    state->draw();
}