Amar’e Stoudemire has taken a lot of shots in this building, but none like the ones he took Sunday night.

Stoudemire, now with the Heat, said he doesn’t like seeing what’s happened to the Knicks and seemed to put a lot of the onus on former teammate Carmelo Anthony.

Stoudemire signed with the Knicks in 2010 and helped turn the franchise around. He said they “brought life back to the city of New York.” But Anthony forced a trade to New York seven months later and immediately became the face of the franchise.

“It’s tough,” Stoudemire said before the Heat’s 98-81 win over the Knicks at the Garden. “When you get involved in this situation, you have to take ownership of it. You have to make sure you made the right decisions for your team and teammates. You have to become a complete player in order to bring your team out of a rut. Everyone can’t do it. It’s not always easy.”

Stoudemire, who started at center Sunday night and had eight points and seven rebounds in 21:57, also said he would have liked to see Jeremy Lin re-sign with the Knicks in 2012. But Stoudemire said some players didn’t like Linsanity. He never mentioned Anthony by name, but he seemed to be talking about him.

There was friction at the time under former coach Mike D’Antoni. Lin flourished in D’Antoni’s equal-opportunity pick-and-roll system.

“If he stayed, it would’ve been cool,” Stoudemire said. “But everyone wasn’t a fan of him being the new star. So he didn’t stay long. But Jeremy was a great, great guy. Great teammate. He worked hard. He put the work in and we’re proud of him to have his moment. A lot of times, you got to enjoy someone’s success. And that wasn’t the case for us during that stretch.

Subscribe to Newsday’s sports newsletter Receive stories, photos and videos about your favorite New York teams plus national sports news and events. By clicking Sign up, you agree to our privacy policy.

“You got to let that player enjoy himself and cherish those moments. He was becoming a star, and I don’t think everybody was pleased with that.”

Anthony was surprised that Stoudemire was talking about something nearly five years old, and he denied that he felt that way about Lin. “I don’t have no comment about that,” he said. “If he was becoming a star, we should embrace that. I don’t know. We didn’t embrace it? Was that the word?

“If that was the case, then I’d be upset right now with [Kristaps Porzingis] — if he’s talking about me. I doubt if he’s talking about me. I doubt that. I highly doubt that.”

Stoudemire was a good soldier throughout his time with the Knicks. It’s possible, however, that he didn’t like sharing the spotlight with Anthony and then watching him become the focal point of the team as Stoudemire continued to fight through injuries.

With the Knicks stumbling through the worst season in franchise history in 2014-15, Stoudemire negotiated a buyout during the All-Star break and signed with Dallas. Now he’s playing with one of the Eastern Conference’s top teams and the Knicks likely will miss the playoffs for the third straight year.

Stoudemire said one of the problems last season was that only “three-fourths” of the Knicks bought into the triangle system. The problems and negativity haven’t ended there. Derek Fisher was fired last month, and the Knicks have lost 14 of their last 17 games.

“It’s been a lot going on and it hasn’t really been great over the years,” Stoudemire said. “It’s hard for me to watch from the outside looking in because I was so involved with creating a positive atmosphere around the Knicks. Now it’s gone the opposite way. Hopefully things can pan out well in the near future.”

Stoudemire said he thought Fisher did a good job preparing his players but that it was not going to be an easy situation for a first-time coach.

“I figured it was going to be tough for him because he stepped into an environment that needed some growth and take some time,” he said. “When Mike Woodson left and we were looking for a coach, we didn’t sign Steve Kerr, we ended up signing Derek Fisher. So I knew it would take some time for him to get adjusted to New York and how to play here. But it didn’t work as well or as fast as most of us would’ve liked.”

This was Stoudemire’s first time playing against his old team since the buyout, and his first time back at the Garden. He received a mix of cheers and boos when he was introduced.

“I got mixed emotions, man,” he said. “So many familiar faces. So I kind of don’t want to beat them too bad, but then again I do. It’s kind of like mixed emotions. Hopefully we’ll have fun.”