Use of Multiple Notifiers in Game Application

I designed a score-based game where the player controls the car using a 9-axis IMU sensor.

In this game, I wanted to have 2 types of pop-ups:

  1. If the car being controlled by the sensor approaches a range of angles (i.e between 15 to 200 degrees), a pop-up to warn the user that he is going “off course” will appear.
  2. When the timer reaches 0, a pop-up to show that time is up.

Also, if there was connectivity detected within those 3 times, then an alert message to show that the mobile phone is back online.

Now the problem that I’m facing is when the car approaches the desired angle range, the pop up doesn’t go away even after the boundary condition has been fulfilled. Because of this, the pop up to indicate that time is up becomes hidden. Below is the code snippet.

I’m assuming that there is a boundary condition that I’m overlooking and I would really appreciate a second pair of eyes! Thanks!

Hello Kat

The best solution is to have two labels, one for connection status, one for time-out, and one popup notifier for the “off course messages”.

Hi Chris!

Thanks for the help. By the two labels, are you referring to separate blocks or just one?

Two Label components on your GUI. Any part of your code (on the same Screen) can update the content of labels at any time.

I’m just a promotion :+1: :smiley: :+1:

Salman Dev

1 Like