test/snake.c

changeset 60
3954c551ded3
parent 59
764fbb013252
child 62
5a592625e2f9
equal deleted inserted replaced
59:764fbb013252 60:3954c551ded3
68 } 68 }
69 69
70 static void create_score_counter(void) { 70 static void create_score_counter(void) {
71 asc_set_font(asc_font(ASC_FONT_BOLD, 14)); 71 asc_set_font(asc_font(ASC_FONT_BOLD, 14));
72 asc_ink_rgb(0, 255, 0); 72 asc_ink_rgb(0, 255, 0);
73 AscSceneNode* node = asc_text( .x = 0, .y = 0, .text = "Score: 0" ); 73 AscSceneNode* node = asc_text(.text = "Score: 0" );
74 asc_scene_add_behavior(node, update_score_counter); 74 asc_scene_add_behavior(node, update_score_counter);
75 asc_add_ui_node(node); 75 asc_add_ui_node(node);
76 } 76 }
77 77
78 int main(int argc, char** argv) { 78 int main(int argc, char** argv) {

mercurial