Table of Contents | ||||||||||
|
||||||||||
AddScene | ||||||||||
Purpose Creates a new scene object in the manager |
||||||||||
Protoype void CSceneMngr::AddScene (string str_name, obj_type l_obj_types = obj_type(), obj_name l_obj_names = obj_name() bool b_cursor = true, bool b_music = true) |
||||||||||
Parameters
|
||||||||||
Description This function adds a new scene to the manager. When you build a scene you have to give is a unique name containing no spaces. You must also provide the layers in a scene. The two lists must match object type to object ID. If you do not wish to add any objects to the scene upon creation, simply ignore the two list parameters. You can always add objects later with AddObject(). In addition, you can control whether or not the scene is allowed to draw a cursor object. This setting remains effective the entire time the scene is loaded. If you want to be able to turn the cursor on and off, allow the cursor to be rendered in the scene and simply use CCursorMngr::ShowCursor() instead. Also, you can use the b_music flag to make the scene stop playing any music and sfx that were invoked by the previous scene when it is loaded. |
||||||||||
Use CSceneMngr scene; obj_type l_types; obj_name l_names; // make two scene layers l_types.push_back(IMAGE_OBJ); l_names.puch_back("my_image"); l_types.push_back(TEXT_OBJ); l_names.push_back("my_text"); // add the scene scene.AddScene("my_scene", l_types, l_names); |
||||||||||
|
||||||||||
|