room_set_camera


描述

With this function you can assign a camera to a specific viewport in a room other than the current one. You supply the room index, the view index (from 0 to 7) and then the index of the camera to use.


语法:

room_set_camera(rm, vind, camera);


参数:

参数 描述
rm The index of the room to set the view camera of
vind The index of the view port to assign the camera to
camera The index of the camera to assign


返回:

N/A(无返回值)


例如:

global.myroom = room_add();
room_set_camera(global.myroom, 0, global.MainCam);

The above code assigns a camera in a newly created room to view port [0].


上一页: General Room Functions And Variables
下一页: room_get_camera
© Copyright YoYo Games Ltd. 2018 All Rights Reserved