Author Topic: Dinamic Sprites  (Read 3425 times)

lord_sarcasmo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Dinamic Sprites
« on: July 09, 2012, 06:16:06 PM »
Is there anyway I can change by code the sprite that is being showed, for example, in a UISprite?
I'm making a level selection screen and the background should change when I click different buttons.

Thanks

simon129

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 20
    • View Profile
Re: Dinamic Sprites
« Reply #1 on: July 09, 2012, 09:18:06 PM »
If they were in the same atlas, you can change the sprite through "spriteName", and run "MakePixelPerfect()"

Or, u can use UITexture and just change their "material"

lord_sarcasmo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Dinamic Sprites
« Reply #2 on: July 15, 2012, 09:12:56 PM »
Thanx, the "spriteName" option worked perfectly.