draw_surface(id, x, y);
参数 描述 id The unique ID value of the surface to draw. x The x position of where to draw the surface. y The y position of where to draw the surface.
N/A(无返回值)
With this function you can draw a surface at a given position within the room, with the top left corner of the image being drawn at the specified x/y position.
注:由于储存在显存里,表面层运行时存在随时停止并退出的可能性。在直接引用它们之前,你需要 一直使用 surface_exists检测表面层是否退出。更多信息请查阅 表面层。
var _vx = camera_get_view_x(view_camera[0]);
var _vy = camera_get_view_y(view_camera[0]);
draw_surface(surf, _vx, _vy);
The above code draws the surface indexed in "surf" at same position as camera view[0].