|
@@ -168,6 +168,17 @@ const NotificationSequence sequence_bullet_fired = {
|
|
|
NULL,
|
|
NULL,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const NotificationSequence sequence_powerup_collected = {
|
|
|
|
|
+ &message_vibro_on,
|
|
|
|
|
+ &message_delay_1,
|
|
|
|
|
+ &message_delay_1,
|
|
|
|
|
+ &message_delay_1,
|
|
|
|
|
+ &message_delay_1,
|
|
|
|
|
+ &message_delay_1,
|
|
|
|
|
+ &message_vibro_off,
|
|
|
|
|
+ NULL,
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const NotificationSequence sequence_nuke = {
|
|
const NotificationSequence sequence_nuke = {
|
|
|
&message_blink_set_color_red,
|
|
&message_blink_set_color_red,
|
|
|
&message_blink_start_100,
|
|
&message_blink_start_100,
|
|
@@ -801,6 +812,9 @@ void powerUp_was_hit(AsteroidsApp* app, int id) {
|
|
|
PowerUp* p = &app->powerUps[id];
|
|
PowerUp* p = &app->powerUps[id];
|
|
|
if(p->display_ttl == 0) return; // Don't collect if already collected or expired
|
|
if(p->display_ttl == 0) return; // Don't collect if already collected or expired
|
|
|
|
|
|
|
|
|
|
+ // Vibrate to indicate power up was collected
|
|
|
|
|
+ notification_message(furi_record_open(RECORD_NOTIFICATION), &sequence_powerup_collected);
|
|
|
|
|
+
|
|
|
switch(p->powerUpType) {
|
|
switch(p->powerUpType) {
|
|
|
case PowerUpTypeLife:
|
|
case PowerUpTypeLife:
|
|
|
if(app->lives < MAXLIVES) app->lives++;
|
|
if(app->lives < MAXLIVES) app->lives++;
|