设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 4913|回复: 2
打印 上一主题 下一主题

[通用发布] EnemyVisualZoom ( 敌人视觉缩放 ) [2012.2.3]

[复制链接]

虚構歪曲

梦石
0
星屑
309
在线时间
1194 小时
注册时间
2010-12-18
帖子
3928

贵宾

跳转到指定楼层
1
发表于 2012-1-25 20:51:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 忧雪の伤 于 2012-8-2 16:14 编辑
  1. #==============================================================================
  2. #  Name [ EnemyVisualZoom ( 敌人视觉缩放 ) ]
  3. #  Apply To [ RPG Maker XP & RPG Maker VX & RPG Maker VX Ace ]
  4. #------------------------------------------------------------------------------
  5. #  Author [ 忧雪の伤 ]
  6. #  Last Update [ 2012.2.3 ]
  7. #------------------------------------------------------------------------------
  8. #  Link [ 66RPG Ideal Script Association ]
  9. #  => http://rpg.blue/group-215-1.html
  10. #  Link [ OWL Authors' Protection Organization ]
  11. #  => http://oapo.qzworld.net/index.html
  12. #==============================================================================

  13. #==============================================================================
  14. # * Test Section
  15. #==============================================================================

  16. unless Module.constants.include? RUBY_VERSION == '1.9.2' ? :ISA : 'ISA'
  17.   message = "You need to add that script over this."
  18.   method(RUBY_VERSION == '1.9.2' ? :msgbox : :p)[message]
  19.   `start http://rpg.blue/thread-181551-1-1.html`
  20. end

  21. #==============================================================================
  22. # * Registered Section
  23. #==============================================================================

  24. $imported['EnemyVisualZoom'] = '2012.2.3'

  25. #==============================================================================
  26. # * Running Section
  27. #==============================================================================

  28. module ISA::EnemyVisualZoom
  29.   #--------------------------------------------------------------------------
  30.   # * Setup Section
  31.   #--------------------------------------------------------------------------
  32.   #    Default : 默认功能开关 ( true or false )
  33.   #--------------------------------------------------------------------------
  34.   Default = true
  35. end

  36. Game_Troop.class_eval {
  37.   next unless ISA::Edition.equal? :xp
  38.   alias isa_setup_for_enemy_visual_zoom setup
  39.   def setup *args
  40.     isa_setup_for_enemy_visual_zoom *args
  41.     @troop_id = args[0] if defined?(@troop_id).nil?
  42.     nil
  43.   end
  44. }

  45. class RPG::Troop
  46.   alias isa_name_for_enemy_visual_zoom name unless $@
  47.   def name *args
  48.     regexp = ISA::EnemyVisualZoom::Regexp
  49.     isa_name_for_enemy_visual_zoom(*args).sub regexp, ''
  50.   end
  51. end

  52. class Sprite_Battler
  53.   alias isa_update_for_enemy_visual_zoom update
  54.   def update *args
  55.     isa_update_for_enemy_visual_zoom *args
  56.     return unless battler.is_a? Game_Enemy
  57.     if defined?(@isa_first_update_for_enemy_visual_zoom).nil?
  58.       return @isa_first_update_for_enemy_visual_zoom = nil
  59.     end
  60.     regexp = /<visual zoom\((true|false)\)>/
  61.     troop_id = $game_troop.instance_variable_get :@troop_id
  62.     $data_troops[troop_id].isa_name_for_enemy_visual_zoom[regexp]
  63.     return unless $1.nil? ? ISA::EnemyVisualZoom::Default : eval($1)
  64.     screen_height = ISA::Edition.equal?(:xp) ? 480 : Graphics.height
  65.     scene = ISA::Edition.equal?(:va) ? SceneManager.scene : $scene
  66.     window_height = scene.instance_variable_get(:@status_window).height rescue 0
  67.     self.zoom_x = self.zoom_y = window_height.to_f / (screen_height - y)
  68.     nil
  69.   end
  70. end
复制代码

被遗忘の机器

梦石
0
星屑
73
在线时间
402 小时
注册时间
2010-7-24
帖子
1492
2
发表于 2012-4-29 23:28:56 | 只看该作者
英文+无注释各种压力啊orz
【镇楼】少年吃我大屌
回复 支持 反对

使用道具 举报

梦石
0
星屑
269
在线时间
5 小时
注册时间
2013-5-13
帖子
3
3
发表于 2013-5-31 20:44:32 | 只看该作者
不错~= =
回复 支持 反对

使用道具 举报

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-3 14:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表