101 static void create_fps_counter(void) { |
101 static void create_fps_counter(void) { |
102 asc_font(ASC_FONT_REGULAR, 12); |
102 asc_font(ASC_FONT_REGULAR, 12); |
103 asc_ink_rgb(255, 255, 255); |
103 asc_ink_rgb(255, 255, 255); |
104 AscSceneNode *node = asc_text(.name = "FPS Counter"); |
104 AscSceneNode *node = asc_text(.name = "FPS Counter"); |
105 asc_behavior_add(node, .func = update_fps_counter, .interval = asc_seconds(1)); |
105 asc_behavior_add(node, .func = update_fps_counter, .interval = asc_seconds(1)); |
106 asc_behavior_add(node, .func = tie_fps_counter_to_corner); |
106 asc_behavior_add(node, tie_fps_counter_to_corner); |
107 asc_ui_add_node(node); |
107 asc_ui_add_node(node); |
108 } |
108 } |
109 |
109 |
110 static void create_score_counter(void) { |
110 static void create_score_counter(void) { |
111 asc_font(ASC_FONT_BOLD, 16); |
111 asc_font(ASC_FONT_BOLD, 16); |