path_rescale

Scales the given path with respect to its center.

语法:

path_rescale(index, xscale, yscale);


参数 描述
index The index of the path to scale.
x轴缩放 What to multiply the current horizontal scale by. Default scale is 1.
y轴缩放 What to multiply the current vertical scale by. Default scale is 1.


返回: N/A(无返回值)


描述

This function can be used to rescale the given path along both (or either) the vertical and horizontal axis, basically moving each of the path points to a new position corresponding to this scale around the centre of the path. This function changes the actual path resource, and so will permanently affect how the path is used by all instances in the game from the moment the function is used until the end of the game.


例如:

path_rescale(path0, 3, 3);

This would rescale path0 to three times its original size.


上一页: Changing Paths
下一页: path_set_closed
© Copyright YoYo Games Ltd. 2018 All Rights Reserved