Project1

标题: 怎么把战斗脚本改成45°的。 [打印本页]

作者: 寻残叶    时间: 2010-8-12 20:08
提示: 作者被禁止或删除 内容自动屏蔽
作者: zhangbanxian    时间: 2010-8-12 20:18
貌似不是改好了?把screen_y也按screen_x那样改嘛。
作者: 寻残叶    时间: 2010-8-12 20:19
提示: 作者被禁止或删除 内容自动屏蔽
作者: 尐度    时间: 2010-8-15 17:12
直接用这个吧
  1. #==============================================================================
  2. # ■ Game_Actor
  3. #------------------------------------------------------------------------------
  4. #  处理角色的类。本类在 Game_Actors 类 ($game_actors)
  5. # 的内部使用、Game_Party 类请参考 ($game_party) 。
  6. #==============================================================================

  7. class Game_Actor < Game_Battler
  8. #--------------------------------------------------------------------------
  9. # ● 取得战斗画面的 X 坐标
  10. #--------------------------------------------------------------------------
  11. def screen_x
  12. case self.index
  13. when 0
  14.    return 350
  15. when 1
  16.    return 430
  17. when 2
  18.    return 510
  19. when 3
  20.    return 580
  21. else
  22.    return 600

  23.   end
  24. end
  25. #--------------------------------------------------------------------------
  26. # ● 取得战斗画面的 Y 坐标
  27. #--------------------------------------------------------------------------
  28. def screen_y
  29. case self.index
  30. when 0
  31.    return 430
  32. when 1
  33.    return 395
  34. when 2
  35.    return 360
  36. when 3
  37.    return 325
  38. else
  39.    return 1000
  40.   end
  41. end
  42. #--------------------------------------------------------------------------
  43. # ● 取得战斗画面的 Z 坐标
  44. #--------------------------------------------------------------------------
  45. def screen_z
  46. case self.index
  47. when 0
  48.    return 10
  49. when 1
  50.    return 9
  51. when 2
  52.    return 8
  53. when 3
  54.    return 7
  55. else
  56.    return 0
  57.    end
  58. end
  59. end


  60. #==============================================================================
  61. # ■ Window_Base
  62. #------------------------------------------------------------------------------
  63. #  游戏中全部窗口的超级类。
  64. #==============================================================================

  65. class Window_Base < Window
  66. #--------------------------------------------------------------------------
  67. # ● 描绘 HP
  68. #     actor : 角色
  69. #     x     : 描画目标 X 坐标
  70. #     y     : 描画目标 Y 坐标
  71. #     width : 描画目标的宽
  72. #--------------------------------------------------------------------------
  73. def draw_actor_hp1(actor, x, y, width = 72)
  74.    # 描绘字符串 "HP"
  75.    self.contents.font.color = system_color
  76.    self.contents.draw_text(x, y, 24, 24, $data_system.words.hp)
  77.    # 计算描绘 MaxHP 所需的空间
  78.    if width - 24 >= 32
  79.      hp_x = x + 32# + width - 24
  80.    end
  81.    # 描绘 HP
  82.    self.contents.font.color = actor.hp == 0 ? knockout_color :
  83.      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  84.    self.contents.draw_text(hp_x, y, 32, 24, actor.hp.to_s, 2)
  85. end
  86. #--------------------------------------------------------------------------
  87. # ● 描绘 SP
  88. #     actor : 角色
  89. #     x     : 描画目标 X 坐标
  90. #     y     : 描画目标 Y 坐标
  91. #     width : 描画目标的宽
  92. #--------------------------------------------------------------------------
  93. def draw_actor_sp1(actor, x, y, width = 72)
  94.    # 描绘字符串 "SP"
  95.    self.contents.font.color = system_color
  96.    self.contents.draw_text(x, y, 24, 24, $data_system.words.sp)
  97.    # 计算描绘 MaxSP 所需的空间
  98.    if width - 24 >= 32
  99.      sp_x = x + 32# + width - 24
  100.    end
  101.    # 描绘 SP
  102.    self.contents.font.color = actor.sp == 0 ? knockout_color :
  103.      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  104.    self.contents.draw_text(sp_x, y, 32, 24, actor.sp.to_s, 2)
  105. end
  106. end
复制代码
在Main之前插入即可。




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