赞 | 23 |
VIP | 207 |
好人卡 | 31 |
积分 | 31 |
经验 | 48797 |
最后登录 | 2024-5-11 |
在线时间 | 1535 小时 |
Lv3.寻梦者 孤独守望
- 梦石
- 0
- 星屑
- 3132
- 在线时间
- 1535 小时
- 注册时间
- 2006-10-16
- 帖子
- 4321
|
深夜发你还以为真会有人夜猫子写脚本不成……
还有 那个太懒没时间是等吐槽的么- class Game_Player
- def move_afterwards(d)
- if passable?(@x,@y,d)
- x = @x + (d == 6 ? 1 : d == 4 ? -1 : 0)
- y = @y + (d == 2 ? 1 : d == 8 ? -1 : 0)
- if $game_map.terrain_tag(x,y) == 5
- s = RPG::Sprite.new()
- s.animation($data_animations[49],false)
- @deal_sprites.push(s)
- @deal_points[s] = [x,y]
- end
- end
- end
- alias afterwards_move_up move_up
- def move_up(b = true)
- move_afterwards(8)
- afterwards_move_up(b)
- end
- alias afterwards_move_down move_down
- def move_down(b = true)
- move_afterwards(2)
- afterwards_move_down(b)
- end
- alias afterwards_move_left move_left
- def move_left(b = true)
- move_afterwards(4)
- afterwards_move_left(b)
- end
- alias afterwards_move_right move_right
- def move_right(b = true)
- move_afterwards(6)
- afterwards_move_right(b)
- end
- alias afterwards_initialize initialize
- def initialize
- afterwards_initialize
- @deal_sprites = []
- @deal_points = {}
- end
- alias afterwards_update update
- def update
- afterwards_update
- sx,sy = $game_map.display_x / 4,$game_map.display_y / 4
- for sprite in @deal_sprites
- sprite.update if sprite.x > 0 && sprite.y > 0 && sprite.x < 640 && sprite.y < 480
- sprite.x = @deal_points[sprite][0] * 32 - sx
- sprite.y = @deal_points[sprite][1] * 32 - sy
- end
- @deal_sprites.reject! {|x| !x.effect? }
- end
- end
-
-
-
复制代码 抛砖引玉吧抛砖引玉- -v
|
|