pxt-badge/notification.ts

18 строки
555 B
TypeScript
Исходник Обычный вид История

2019-07-26 18:20:40 +03:00
namespace badge {
function notification() {
music.baDing.play()
controller.B.onEvent(ControllerButtonEvent.Pressed, () => {
storyboard.replace("home");
})
scene.setBackgroundImage(image.create(screen.width, screen.height));
scene.backgroundImage().printCenter(badge.notificationText, 30, 7, image.font8);
badge.notificationText = undefined;
scene.cameraShake()
2019-08-26 23:07:33 +03:00
controller.startLightPulse(0xff0000, 400);
2019-07-26 18:20:40 +03:00
}
storyboard.registerScene("notification", notification);
}