indexing description: "[ Main scene where some of the loaded pictures are loaded and some music is played ]" date: "$Date$" revision: "$Revision$" class MAIN_SCENE inherit SHARED_RESOURCES EM_SHARED_SUBSYSTEMS EM_DRAWABLE_SCENE redefine initialize_scene end create make_scene feature -- Initialization initialize_scene is -- Initialize the scene local bitmap_string: EM_STRING ttf_string: EM_STRING do set_background_color (create {EM_COLOR}.make_white) set_frame_counter_visibility (true) -- Place some of the images resources.sprite_em.set_x_y (10, 10) resources.sprite_em.start resources.sprite_em.set_do_loop (True) main_container.extend (resources.sprite_em) resources.image_car.set_x_y (337,150) main_container.extend (resources.image_car) resources.image_hello_world.set_x_y (70, 200) main_container.extend (resources.image_hello_world) resources.image_earth.set_x_y (430, 266) resources.image_earth.set_transparent_color (0, 0, 0) main_container.extend (resources.image_earth) resources.image_art.set_x_y (10, 130) resources.image_art.set_transparent_color (0, 0, 0) main_container.extend (resources.image_art) -- Use the fonts create bitmap_string.make ("BMP Font", resources.bmp_font_vera) bitmap_string.set_x_y (350, 30) main_container.extend (bitmap_string) resources.ttf_font_vera.set_color (create {EM_COLOR}.make_with_rgb(30, 30, 230)) create ttf_string.make ("TrueType Font", resources.ttf_font_vera) ttf_string.set_x_y (350, 70) main_container.extend (ttf_string) -- Play the music and the sound -- Note: because EM_MUSIC_PLAYER and EM_SOUND_PLAYER expect -- filenames rather than EM_MUSIC and EM_SOUND instances, we DIDN'T -- load the audio-section from 'resources', but just use the paths of -- the files create music_player.make_with_file (resources.path_music_main, false) music_player.set_repeat (true) music_player.play create sound_player.make_empty (false) sound_player.play_file (resources.path_sfx_drum, 0) end music_player: EM_MUSIC_PLAYER sound_player: EM_SOUND_PLAYER end