Physics Variables

与"传统"碰撞和运动系统一样,物理系统也有一系列实例变量在创建对象时分配给对象的每个实例。其中一些属性可以由用户在 GML 中定义,但许多属性是只读的,而且更多属性仅适用于碰撞事件。

The following variables exists in all physics-enabled objects and they can be read from and written to (i.e.: changed) using code from instances and script functions:

 

某些变量为只读变量,这意味着它们包含的信息不能通过实例代码或脚本函数进行更改 (但 GameMaker 可以在内部更改,这就是为什么这些变量是变量而不是 常量 )。以下列表显示了只读变量,这些变量存在于所有启用了物理的对象中:

 

Finally, there are a number of temporary variables that exist in physics-enabled objects and are created only in the collision event. These variables are like those listed above and are read-only: