playMaker

Author Topic: Adding to Score If you tap the correct sprite, and decreasing if not  (Read 825 times)

JakexHorror

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Hey guys.

Im trying to create a simple mini game in my app which basically awards the player a +1 if they tap the right coloured square and -1 If they tap on an incorrect square.

What would be the best way to go about this.
 
Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Hi,

 you will need to have some sort of manager for this.

each squre need to fire a common event, for example "SQUARE TAP", and pass maybe a reference of the square in the event data.

then you have one fsm that respond to this "SQUARE TAPE", get the reference from the event, and then knows if the square is good or bad, based on that, that fsm will fire two events: "SQUARE TAPE OK" and "SQUARE TAPE WRONG".

then any other fsm can implement these two events. One can increase and decrease score, another can trigger sounds, etc etc.

 does that answer your question? Or are you looking for how to check if a square typ is right or wrong?

bye,

 Jean