| 本帖最后由 alexncf125 于 2021-3-27 23:21 编辑 
 自定义图片命名成角色ID, 图片不存在时会报错
   
 class Window_Status < Window_Selectable  #--------------------------------------------------------------------------  # ● 绘制说明  #--------------------------------------------------------------------------  def draw_description(x, y)    bitmap = Cache.picture("#{@actor.id}")    rect = Rect.new(0, 0, 180, line_height * 2)    contents.blt(x, y, bitmap, rect)    bitmap.dispose  endend
class Window_Status < Window_Selectable 
  #-------------------------------------------------------------------------- 
  # ● 绘制说明 
  #-------------------------------------------------------------------------- 
  def draw_description(x, y) 
    bitmap = Cache.picture("#{@actor.id}") 
    rect = Rect.new(0, 0, 180, line_height * 2) 
    contents.blt(x, y, bitmap, rect) 
    bitmap.dispose 
  end 
end 
 |