赞 | 1 |
VIP | 5 |
好人卡 | 4 |
积分 | 1 |
经验 | 23670 |
最后登录 | 2014-11-20 |
在线时间 | 378 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 378 小时
- 注册时间
- 2013-10-14
- 帖子
- 215
|
本帖最后由 batfjtn 于 2013-12-30 14:24 编辑
直接输入名字就可以了啊~~!!
标签是def XXXX
如果哪里需要跳了你就直接输入XXXX就可以了~~!!
例子~~!!- #--------------------------------------------------------------------------
- # ● 刷新角色
- #--------------------------------------------------------------------------
- def update_actor
- refresh(0) if @x != $game_player.x
- refresh(1) if @y != $game_player.y
- refresh(2) if [url=home.php?mod=space&uid=188055]@d[/url] != $game_player.direction
- update_actor_attk if move? #跳转到 def update_actor_attk
- update_actor_skill if move? and skill? #跳转到 def update_actor_skill
- update_actor_item #跳转到 def update_actor_item
- update_bullet if @bullets.size > 0 #跳转到 def update_bullet
- end
- #--------------------------------------------------------------------------
- # ● 刷按下物品键时
- #--------------------------------------------------------------------------
- def update_actor_item
- Item_KEYS.each {|key,k|
- if Kboard.trigger?(k)
- item = $data_items[@actor.item_key[key]]
- return if item.nil?
- item_effect(item)
- end
- }
- def item_effect(item)
- damage = @actor.item_effect(item)
- $game_player.animation_id = item.animation2_id
- $game_system.se_play(item.menu_se)
- $game_party.lose_item(item.id,1)
- $refresh["item"] = true
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新按下技能键时
- #--------------------------------------------------------------------------
- def update_actor_skill
- if @actor_atktime <= 0
- SKILL_KEYS.each {|key, k|
- if Kboard.trigger?(k)
- skill = $game_skills[@actor.key[key]]
- return if skill.nil?
- if skill.scope == 2
- rangs = ARPG_Rangs.new($game_player, skill.rang).rangs
- damage_skill(@actor, skill, rangs, skill.dop?)
- elsif skill.scope == 1 or skill.scope == 3
- damage_skill(@actor, skill)
- end
- end
- }
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新角色普通攻击行为
- #--------------------------------------------------------------------------
- def update_actor_attk(d = false)
- # C按下时
- if ((Kboard.trigger?($R_Key_SPACE) or Kboard.trigger?($R_Key_RETURN)) or S[1])and @actor_atktime <= 0
- if $data_weapons[@actor.weapon_id].element_set.include?(21)
- new_x = @x + ([url=home.php?mod=space&uid=188055]@d[/url] == 6 ? 1 : [url=home.php?mod=space&uid=188055]@d[/url] == 4 ? -1 : 0)
- new_y = @y + (@d == 2 ? 1 : @d == 8 ? -1 : 0)
- event = $game_map.events[$game_map.check_event(new_x,new_y)]
- return if !event.nil? and !event.is_enemy?
- rang_atk
- return
- end
- new_x = @x + (@d == 6 ? 1 : @d == 4 ? -1 : 0)
- new_y = @y + (@d == 2 ? 1 : @d == 8 ? -1 : 0)
- event = $game_map.events[$game_map.check_event(new_x,new_y)]
- if !event.nil? and event.maxhp > 0 and @actor_atktime <= 0
- @attev = event
- show_ain(2,d)
- dagame_acon(event,event_damage(@actor, event),@actor.animation2_id)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新精灵的移动以及接触判断
- #--------------------------------------------------------------------------
- def update_bullet
- for bullet in @bullets
- bullet.update
- case bullet.hit_event
- when String
- if bullet.opacity <= 10
- $scene.spriteset.delete_bullet(bullet)
- @bullets.delete(bullet)
- end
- when Game_Event
- event = bullet.hit_event
- next if !event.is_enemy?
- @attev = event
- dagame_acon(event,event_damage(@actor, event),@actor.animation2_id)
- $scene.spriteset.delete_bullet(bullet)
- @bullets.delete(bullet)
- end
- end
- end
复制代码 |
|