QQ截图20160114163327.png (50.1 KB, 下载次数: 7)
QQ截图20160114164931.png (40.56 KB, 下载次数: 10)
angle
精灵的旋转角度。以逆时针方向 360 度系统来指定。在旋转图画时会花费时间,所以要尽量避免。
#-------------------------------------------------------------------------- # ●描绘 HP #-------------------------------------------------------------------------- def draw_actor_hp_bar(actor, x, y, width = 144 , height = 68) #描绘HP字符 self.contents.font.size = 18 self.contents.draw_text(x-25, y+76, 70, 32,actor.hp.to_s, 2) self.contents.draw_text(x-10, y+76, 70, 32, "体:") #描绘HP self.contents.fill_rect(x+2, y+2, width,height, Color.new(0,0,0,255)) w1 = 1.0 * actor.hp / actor.maxhp * height self.contents.fill_rect(x+2, y+2, width,w1, Color.new(255,0,0,255)) end
QQ截图20160115160826.png (592 KB, 下载次数: 10)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |