像是圖片這樣的效果,只要在"狀態"裡的圖片是立繪就行了 有找到一個日文的網站有,可是用起來失敗了,我又看不懂日文....求大神了拜託!! ...
jiushiainilip19 发表于 2015-11-13 03:54 Window_Status #==============================================================================
#==============================================================================# ■ Window_Status#------------------------------------------------------------------------------# 显示状态画面、完全规格的状态窗口。#============================================================================== class Window_Status < Window_Base #-------------------------------------------------------------------------- # ● 初始化对像 # actor : 角色 #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 640, 480) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear #坐标什么的自己调控一下就可以了解了 #只要对应图片的名字和游戏名字一样就好了 #立绘就自己弄了 反正图片已经有了 bitmap = RPG::Cache.picture(@actor.name.to_s) self.contents.blt(x+180, y+20, bitmap, Rect.new(0, 0, 280, 300)) self.contents.draw_text(x+160, y-30, 60, 32, @actor.name.to_s) draw_actor_graphic(@actor, 40, 112) draw_actor_name(@actor, 4, 0) draw_actor_class(@actor, 4 + 144, 0)
#============================================================================== # ■ Window_Status #------------------------------------------------------------------------------ # 显示状态画面、完全规格的状态窗口。 #============================================================================== class Window_Status < Window_Base #-------------------------------------------------------------------------- # ● 初始化对像 # actor : 角色 #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 640, 480) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear #坐标什么的自己调控一下就可以了解了 #只要对应图片的名字和游戏名字一样就好了 #立绘就自己弄了 反正图片已经有了 bitmap = RPG::Cache.picture(@actor.name.to_s) self.contents.blt(x+180, y+20, bitmap, Rect.new(0, 0, 280, 300)) self.contents.draw_text(x+160, y-30, 60, 32, @actor.name.to_s) draw_actor_graphic(@actor, 40, 112) draw_actor_name(@actor, 4, 0) draw_actor_class(@actor, 4 + 144, 0)
查看全部评分
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-22 23:19
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.