示例#1
0
文件: tool.cpp 项目: JRevel/src
void Tool::update(const PlayerController &event)
{
    updateTool(event);
    if(event.pressed(SELECT) && isInside(event.mousePos()))
    {
        if(m_selected)
            m_player = (m_player+1)%m_players.size();
        else
        {
            select();
        }
    }
}
示例#2
0
void GuiCommandButton::actionPerformed(const PlayerController &event, Vec pos, Vec dim, Gui* gui)
{
    if(event.pressed(0))
        m_commands++;
}