playMaker

Author Topic: problem about drawing texture[SOLVED]  (Read 2426 times)

ruifang

  • Playmaker Newbie
  • *
  • Posts: 4
problem about drawing texture[SOLVED]
« on: November 03, 2013, 08:39:16 AM »
Hi, there, problem again.

Now I face another problem. First I use 3 hearts as the max lives of my character and set up with "draw texture action." So every time when he meets the bomb, the gui texture will be updated (the heart will become two till killed).

So my question is how to connect the draw action with the actual heart icons on the screen. Can someone give me am answer or tips?

Do I need to put the array list script into the gui texture? And if so, what is the next step?

Thanks!!   
« Last Edit: November 05, 2013, 02:04:40 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: problem about drawing texture
« Reply #1 on: November 04, 2013, 01:52:27 AM »
Hi,

 you need to abstract your system.

-- create your heart prefab as something that can work in any situation.
-- it has 3 gameobjects, one for each heart ( OR one gameobject with one texture with 3 hearts drawn in it)
-- create a global event "KILL" or something, that everytime it's called, decrease by 1  the heart counts, so you destroy one heart gamobject or switch the texture to the one with 2 hearts.

 etc. Does that make sense?

bye,

 Jean

ruifang

  • Playmaker Newbie
  • *
  • Posts: 4
Re: problem about drawing texture
« Reply #2 on: November 05, 2013, 01:06:42 AM »
problem solved!!!

THANK YOU!!!