Project1
标题:
【脚本党】你的一个方法里面最多有多少个draw_text&blt系列
[打印本页]
作者:
晴兰
时间:
2013-8-28 10:37
提示:
作者被禁止或删除 内容自动屏蔽
作者:
无脑之人
时间:
2013-8-28 10:40
都是书写的时候用到……draw_text就是写字,blt就是图片文字……
当然我把draw_text给改造了一下www
作者:
Sunny.J
时间:
2013-8-28 11:35
非脚本党路过。。。我其实根本不知道draw_text/blt是什么。。
作者:
satgo1546
时间:
2013-8-28 12:01
2
描边字draw_text要9次啦啦啦
作者:
DeathKing
时间:
2013-8-28 12:07
得看情况吧,15个一下都比较常见啊。
作者:
怪蜀黍
时间:
2013-8-28 12:27
你看有多少个
#--------------------------------------------------------------------------
# ● 宠物属性的描绘
#--------------------------------------------------------------------------
def draw_attribute(pet)
skills = get_skills(pet)
icon_rect = Rect.new(0, 0, 24, 24) if icon_rect.nil?
self.contents.font.color = system_color
self.contents.draw_text(@rect[3] , "好感槽:")
self.contents.draw_text(@rect[4] , "攻击力:")
self.contents.draw_text(@rect[5] , "精神力:")
self.contents.draw_text(@rect[6] , "防御力:")
self.contents.draw_text(@rect[7] , "好感度衰减间隔:")
self.contents.draw_text(@rect[8] , "协助技:")
self.contents.draw_text(@rect[10], "场地技:")
self.contents.draw_text(@rect[12], "攻击技:")
self.contents.font.color = normal_color
self.contents.draw_text( 80, WLH * 9, 40, WLH, pet.maxhp.to_s, 2)
self.contents.draw_text(260, WLH * 9, 40, WLH, pet.atk.to_s, 2)
self.contents.draw_text( 80, WLH * 10, 40, WLH, pet.int.to_s, 2)
self.contents.draw_text(260, WLH * 10, 40, WLH, pet.pdef.to_s, 2)
self.contents.draw_text(160, WLH * 11, 40, WLH, pet.maxsp.to_s, 2)
if skills[0].size > 0
bitmap = RPG::Cache.icon(skills[0][0].icon_name)
self.contents.blt(80, WLH * 12, bitmap, icon_rect)
self.contents.draw_text(104, WLH * 12, 124, WLH, skills[0][0].name)
else
self.contents.draw_text(100, WLH * 12, 124, WLH, "无")
end
if skills[1].size > 0
bitmap = RPG::Cache.icon(skills[0][0].icon_name)
self.contents.blt(80, WLH * 13, bitmap, icon_rect)
self.contents.draw_text(104, WLH * 13, 124, WLH, skills[1][0].name)
else
self.contents.draw_text(100, WLH * 13, 124, WLH, "无")
end
if skills[2].size > 0
for i in 0...skills[2].size
bitmap = RPG::Cache.icon(skills[2][i].icon_name)
self.contents.blt(80 , WLH * 14, bitmap, icon_rect) if i == 0
self.contents.blt(200, WLH * 14, bitmap, icon_rect) if i == 1
self.contents.blt(80 , WLH * 15, bitmap, icon_rect) if i == 2
self.contents.blt(200, WLH * 15, bitmap, icon_rect) if i == 3
self.contents.draw_text(104, WLH * 14, 124, WLH, skills[2][i].name) if i == 0
self.contents.draw_text(224, WLH * 14, 124, WLH, skills[2][i].name) if i == 1
self.contents.draw_text(104, WLH * 15, 124, WLH, skills[2][i].name) if i == 2
self.contents.draw_text(224, WLH * 15, 124, WLH, skills[2][i].name) if i == 3
end
else
self.contents.draw_text(100, WLH * 14, 100, WLH, "无")
end
end
复制代码
作者:
鑫の尘埃
时间:
2013-8-29 19:20
吾乃脚本盲
作者:
电子最终龙
时间:
2013-8-29 19:38
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 64, 20, "名稱")
self.contents.draw_text(152, 0, 64, 20, "圖標")
self.contents.draw_text(0, 20, 64, 20, "說明")
self.contents.draw_text(0, 40, 64, 20, "備註")
self.contents.draw_text(0, 80, 128, 20, "增減HP")
self.contents.draw_text(152, 80, 128, 20, "增減MP")
self.contents.draw_text(304, 80, 128, 20, "增減SP")
self.contents.draw_text(456, 80, 128, 20, "增減傷勢")
self.contents.draw_text(0, 100, 128, 20, "力量%")
self.contents.draw_text(152, 100, 128, 20, "耐力%")
self.contents.draw_text(304, 100, 128, 20, "敏捷%")
self.contents.draw_text(456, 100, 128, 20, "造成傷害%")
self.contents.draw_text(0, 120, 128, 20, "MP傷害")
self.contents.draw_text(152, 120, 128, 20, "SP傷害")
self.contents.draw_text(304, 120, 128, 20, "攻擊毒性")
self.contents.draw_text(456, 120, 128, 20, "攻擊範圍+")
self.contents.draw_text(0, 140, 128, 20, "殺傷範圍+")
self.contents.draw_text(152, 140, 128, 20, "移動範圍+")
self.contents.draw_text(304, 140, 128, 20, "挨打傷害%")
self.contents.draw_text(456, 140, 128, 20, "加暴擊率")
self.contents.draw_text(0, 160, 128, 20, "加雙擊率")
self.contents.draw_text(152, 160, 128, 20, "造成傷勢%")
self.contents.draw_text(304, 160, 128, 20, "受到傷勢%")
self.contents.draw_text(456, 160, 128, 20, "復活類型")
self.contents.draw_text(0, 180, 128, 20, "吸血率%")
self.contents.draw_text(152, 180, 128, 20, "吸魔量")
self.contents.draw_text(304, 180, 128, 20, "被擊吸魔%")
self.contents.draw_text(456, 180, 128, 20, "吸體率%")
self.contents.draw_text(0, 200, 128, 20, "破甲率%")
self.contents.draw_text(152, 200, 128, 20, "破防率%")
self.contents.draw_text(304, 200, 128, 20, "填充速度%")
self.contents.draw_text(456, 200, 128, 20, "事件id")
self.contents.draw_text(0, 220, 128, 20, "反擊量%")
self.contents.draw_text(152, 220, 128, 20, "加反擊量%")
self.contents.draw_text(304, 220, 128, 20, "加減免量%")
self.contents.draw_text(456, 220, 128, 20, "加狀態率%")
self.contents.draw_text(0, 240, 128, 20, "免疫破甲")
self.contents.draw_text(152, 240, 128, 20, "免疫破防")
self.contents.draw_text(304, 240, 128, 20, "免疫中毒")
self.contents.draw_text(456, 240, 128, 20, "免疫受傷")
self.contents.draw_text(0, 260, 128, 20, "免疫變形")
self.contents.draw_text(0, 280, 608, 20, "狀態回合 : 幻 昏 定 疫 血 瘀 胃 麻 虛 ")
self.contents.draw_text(0, 300, 608, 20, "解除狀態 : 幻 昏 定 疫 血 瘀 胃 麻 虛 ")
self.contents.draw_text(0, 320, 608, 20, "免疫狀態 : 幻 昏 定 疫 血 瘀 胃 麻 虛 ")
self.contents.draw_text(0, 340, 304, 20, "命中%:戰 神 元 射 刺 ")
self.contents.draw_text(304, 340, 304, 20, "閃避%:戰 神 元 射 刺 ")
self.contents.draw_text(0, 360, 304, 20, "威力%:戰 神 元 射 刺 ")
self.contents.draw_text(304, 360, 304, 20, "減威力:戰 神 元 射 刺")
self.contents.draw_text(0, 380, 304, 20, "爆氣%:戰 神 元 射 刺")
self.contents.draw_text(480, 0, 128, 20, "保存退出")
self.contents.font.color = normal_color
self.contents.draw_text(64, 0, 100, 20, @data.name== "" ? "-" : @data.name)
self.contents.draw_text(152+64, 0, 64, 20, @data.icon=="" ? "-":@data.icon)
self.contents.draw_text(64, 20, 544, 20, @data.description==""?"-":@data.description)
self.contents.draw_text(64, 40, 544, 20, @data.commont==""?"-":@data.commont)
self.contents.draw_text(96, 80, 64, 20, @data.flip_damage.to_s)
self.contents.draw_text(248, 80, 128, 20, @data.flip_mp.to_s)
self.contents.draw_text(400, 80, 128, 20, @data.flip_sp.to_s)
self.contents.draw_text(552, 80, 128, 20, @data.flip_injure.to_s)
self.contents.draw_text(96, 100, 128, 20, @data.atk_rate.to_s)
self.contents.draw_text(248, 100, 128, 20, @data.def_rate.to_s)
self.contents.draw_text(400, 100, 128, 20, @data.agi_rate.to_s)
self.contents.draw_text(552, 100, 128, 20, @data.damage_rate.to_s)
self.contents.draw_text(96, 120, 128, 20, @data.mp_damage.to_s)
self.contents.draw_text(248, 120, 128, 20, @data.sp_damage.to_s)
self.contents.draw_text(400, 120, 128, 20, @data.poi_plus.to_s)
self.contents.draw_text(552, 120, 128, 20, @data.atk_range_plus.to_s)
self.contents.draw_text(96, 140, 128, 20, @data.atk_scale_plus.to_s)
self.contents.draw_text(248, 140, 128, 20, @data.movement_plus.to_s)
self.contents.draw_text(400, 140, 128, 20, @data.damage_take_rate.to_s)
self.contents.draw_text(552, 140, 128, 20, @data.cr_rate_plus.to_s)
self.contents.draw_text(96, 160, 128, 20, @data.doublehit_rate_plus.to_s)
self.contents.draw_text(248, 160, 128, 20, @data.injure_rate_hit.to_s)
self.contents.draw_text(400, 160, 128, 20, @data.injure_rate_hitted.to_s)
self.contents.draw_text(552, 160, 128, 20, @data.reborn_type.to_s)
self.contents.draw_text(96, 180, 128, 20, @data.hp_drain_rate.to_s)
self.contents.draw_text(248, 180, 128, 20, @data.mp_drain.to_s)
self.contents.draw_text(400, 180, 128, 20, @data.mp_drain_rate_hit.to_s)
self.contents.draw_text(552, 180, 128, 20, @data.sp_drain.to_s)
self.contents.draw_text(96, 200, 128, 20, @data.ignore_armor_rate.to_s)
self.contents.draw_text(248, 200, 128, 20, @data.ignore_raito_rate.to_s)
self.contents.draw_text(400, 200, 128, 20, @data.reload_rate.to_s)
self.contents.draw_text(552, 200, 128, 20, @data.event_id.to_s)
self.contents.draw_text(96, 220, 128, 20, @data.counter_rate.to_s)
self.contents.draw_text(248, 220, 128, 20, @data.counter_rate_plus.to_s)
self.contents.draw_text(400, 220, 128, 20, @data.obsorb_rate_plus.to_s)
self.contents.draw_text(552, 220, 128, 20, @data.state_plus_rate.to_s)
self.contents.draw_text(96, 240, 128, 20, @data.cant_ignore_armor ? "○" : "×")
self.contents.draw_text(248, 240, 128, 20, @data.cant_ignore_raito ? "○" : "×")
self.contents.draw_text(400, 240, 128, 20, @data.immune_poison ? "○" : "×")
self.contents.draw_text(552, 240, 128, 20, @data.cant_injure ? "○" : "×")
self.contents.draw_text(96, 260, 128, 20, @data.cant_trans ? "○" : "×")
for i in 1..9
self.contents.draw_text(88+i*40, 280, 20, 20, @data.state_plus[i].to_s)
self.contents.draw_text(88+i*40, 300, 20, 20, @data.state_minus[i] ? "○" : "×")
self.contents.draw_text(88+i*40, 320, 20, 20, @data.state_immune[i] ? "○" : "×")
end
for i in 1..5
self.contents.draw_text(54+i*40, 340, 24, 20, @data.hit_rates[i].to_s)
self.contents.draw_text(358+i*40, 340, 24, 20, @data.eva_rates_plus[i].to_s)
self.contents.draw_text(54+i*40, 360, 24, 20, @data.power_rates[i].to_s)
self.contents.draw_text(358+i*40, 360, 24, 20, @data.hitted_power_rates[i].to_s)
self.contents.draw_text(54+i*40, 380, 24, 20, @data.burst_rates_plus[i].to_s)
end
end
复制代码
這是數據編輯器的腳本囧囧囧
作者:
SuperMario
时间:
2013-8-30 01:39
一个方法里写太多不美观,也不便于修改,还是“分而治之”的好。
作者:
恶魔般的天使
时间:
2013-8-30 01:45
我觉得楼上的说法我赞同。其次楼上的头像让我回到童年采蘑菇的时代。
好怀念曾经通宵的日子~~
@SuperMario
作者:
SuperMario
时间:
2013-8-30 06:18
恶魔般的天使 发表于 2013-8-30 01:45
我觉得楼上的说法我赞同。其次楼上的头像让我回到童年采蘑菇的时代。
好怀念曾经通宵的日子~~@SuperMario ...
不是都叫踩蘑菇吗,或者顶蘑菇
作者:
熊喵酱
时间:
2013-8-30 06:24
感覺這真的要看情況吧...
一个繪制屬性的跟定義圖片接觸的差距就很大很大...
作者:
紫英晓狼1130
时间:
2013-8-30 06:31
表示我的轩辕剑菜单每一段都有draw_text
作者:
945127391
时间:
2013-8-30 07:10
描绘属性神马的时常都会用到一堆吧……
作者:
化螺耕
时间:
2013-8-30 09:08
呃…………纯脚本盲的没去注意这些
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1