If by "Star Wars 2" you mean the film Star Wars Episode II: Attack of the Clones, then Star Wars: Battlefront actually came out after that movie's release. The game drew on designs, concepts, and locations from Attack of the Clones as well as the earlier films. The same pattern held for Star Wars: Battlefront II, which launched following the release of Episode III: Revenge of the Sith.