Table of Contents | ||||||
|
||||||
AddObject | ||||||
Purpose Adds a new object to the current scene |
||||||
Protoype void CSceneMngr::AddObject (int i_type, string str_name, int i_layer = -1) |
||||||
Parameters
|
||||||
Description After a scene has been loaded, you can add objects to that scene using this function. You must specify the type of object (MUSIC_OBJ, TEXT_OBJ, IMAGE_OBJ, BUTTON_OBJ, SPRITE_OBJ) that you will be adding, along with the unique ID that was assigned to that object when it was created. You then have the option of sticking the object anywhere in the scene. If you choose to ignore the last parameter, the object will automatically be loaded as the bottom-most layer.
|
||||||
Use CSceneMngr scene; // assume scene loaded // load a text object into layer 15 scene.AddObject(TEXT_OBJ, "my_text", 15); |
||||||
|
||||||
|