Esempio n. 1
0
void MiniGame::changeLane(int direction)
{
    if(direction == LEFT && selectedLane != 0)
        selectLane(selectedLane-1);
    else if(direction == RIGHT && selectedLane != 4)
        selectLane(selectedLane+1);
}
Esempio n. 2
0
void MiniGame::changeLane(int direction, bool attacker)
{
    if(attacker)
    {
        if(direction == LEFT && selectedALane != 0)
            selectLane(selectedALane-1, true);
        else if(direction == RIGHT && selectedALane != 4)
            selectLane(selectedALane+1, true);
    }
    else
    {
        if(direction == LEFT && selectedDLane != 0)
            selectLane(selectedDLane-1, false);
        else if(direction == RIGHT && selectedDLane != 4)
            selectLane(selectedDLane+1, false);
    }
    
}