room_set_width


描述

With this function you can change (or set) the width of any room in your game except the current one.


语法:

room_set_width(index, w);


参数:

参数 描述
index The index of the room to set the width of.
w The new width of the room in pixels.


返回:

N/A(无返回值)


例如:

global.myroom = room_add();
room_set_width(global.myroom, 640);
room_set_height(global.myroom, 480);
room_set_persistent(global.myroom, false);

This will create a new room and store its index in the variable "global.myroom". It will then set its width to 640 pixels, its height to 480 pixels, its caption to 'Game Room' and its persistence to 'false'.


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