| 12345678910111213141516171819202122232425262728293031323334 |
- function check_hitstop()
- {
- if global.hitstop > 0
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- /// @desc 优雅地检测该实例的sprite当前动画是否到达最后一帧
- function animation_end()
- {
- if animation_spd == 0
- return false;
- return (image_index + animation_spd >= image_number);
- }
- /// @desc 优雅地将该实例的sprite替换为给定值,并将sprite_index归零
- /// @param {Asset.GMSprite} _sprite 将要替换为的sprite
- function set_sprite(_sprite)
- {
- if sprite_index != _sprite
- {
- sprite_index = _sprite;
- image_index = 0;
- }
- }
- function camera_snap()
- {
- oCamera.x = oCamera.x_to;
- oCamera.y = oCamera.y_to;
- }
|