How many free throws are given to shooting foul?

how many free throws are given to shooting foul?
yesterday i am playing NBA 2K14, suddenly offensive team got shooting foul, then defending team got 2 free throws, again offensive team got shooting foul, then defending team got only one free throw, why only one free throw is given for second shooting foul?
Update: @obito79 would you please read question fully & then post answer.
5 answers 5