The Irving-based parent of the Chuck E. Cheese’s restaurant chain has agreed to be acquired by an affiliate of Apollo Global Management for about $950 million.Founded in 1977, Chuck E. Cheese’s restaurants are known for their mix of games, play areas and robotic characters that provide musical entertainment. The chain has been struggling to lift sales, even after a makeover of its rodent mascot in 2012 that was intended to refresh its outdated image. Enter Leon Black’s investment firm Apollo, which buys troubled companies using borrowed money and tries to sell them for more, usually years later, in a transaction known as a leveraged buyout. The companies say Apollo will pay $54 per share for CEC Entertainment. That’s about a 25 percent premium over CEC’s closing price Jan. 7, the last trading day before media speculation about a transaction, the companies noted. They put the deal’s value at $1.3 billion, including debt. CEC has about 17.6 million outstanding shares, according to FactSet. The company and its franchisees run 577 Chuck. E. Cheese’s locations in 47 states and 10 foreign countries or territories. CEC may seek out superior proposals from limited third parties until Jan. 29. The company, which announced Thursday that it adopted a shareholder-rights plan, had been reviewing its options. Businesses commonly use a shareholder-rights plan, also known as a “poison pill,” to ward off hostile-takeover attempts.CEC said its shareholder-rights plan was implemented to help its board “in overseeing a fair and orderly process” and to maximize shareholder value during a sale. CEC said its rights plan won’t prevent or restrict any person from making a superior bid. The restaurant was founded by Nolan Bushnell, a co-founder of the video game company Atari. Its mascot has undergone various changes over the years. At one point, it was depicted as a “lovable thug” from New Jersey that sometimes held a cigar, according to fan site ShowBizPizza.com. CEC said its board unanimously approved the transaction. The company’s shares (ticker: CEC) closed up $6.32, or about 13 percent, at $54.75.