Project1

标题: 图片固定 [打印本页]

作者: 子弹君    时间: 2015-3-7 00:38
标题: 图片固定
  1. #==============================================================================
  2. #  图片固定  by 子弹君
  3. #==============================================================================
  4. #  说明:
  5. #  在要固定住的图片名字前加一个[固定]
  6. #==============================================================================
  7. $BombScript ||= {};$BombScript["图片固定"] = "图片固定20150305"
  8. #==============================================================================
  9. # ■ Sprite_Picture
  10. #------------------------------------------------------------------------------
  11. #  显示图片用的精灵。根据 Game_Picture 类的实例的状态自动变化。
  12. #==============================================================================

  13. class Sprite_Picture < Sprite
  14.   #--------------------------------------------------------------------------
  15.   # ● 更新画面
  16.   #--------------------------------------------------------------------------
  17.   def update
  18.     super
  19.     update_bitmap
  20.     update_origin
  21.     if @picture.name.include?("[固定]")
  22.             self.x = 0 - $game_map.display_x * 32
  23.             self.y = 0 - $game_map.display_y * 32
  24.           else
  25.           update_position
  26.           end
  27.     update_zoom
  28.     update_other
  29.   end
  30. end
复制代码





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1