赞 | 14 |
VIP | 0 |
好人卡 | 3 |
积分 | 73 |
经验 | 8295 |
最后登录 | 2024-8-24 |
在线时间 | 1690 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7290
- 在线时间
- 1690 小时
- 注册时间
- 2017-4-28
- 帖子
- 85
|
你的意思是指定的事件及主角不變色, 其他事件會變?
你的要求不太能看明白....
- class Game_Event
- attr_reader :name
-
- def name
- return @event.name
- end
- end
- class Spriteset_Map
- def create_viewports
- @viewport1 = Viewport.new
- @viewportX = Viewport.new
- @viewport2 = Viewport.new
- @viewport3 = Viewport.new
- @viewportX.z = 25
- @viewport2.z = 50
- @viewport3.z = 100
- end
- def create_characters
- @character_sprites = []
- $game_map.events.values.each do |event|
- if event.name =~ /<c>/i
- @character_sprites.push(Sprite_Character.new(@viewportX, event))
- else
- @character_sprites.push(Sprite_Character.new(@viewport1, event))
- end
- end
- $game_map.vehicles.each do |vehicle|
- @character_sprites.push(Sprite_Character.new(@viewportX, vehicle))
- end
- $game_player.followers.reverse_each do |follower|
- @character_sprites.push(Sprite_Character.new(@viewportX, follower))
- end
- @character_sprites.push(Sprite_Character.new(@viewportX, $game_player))
- @map_id = $game_map.map_id
- end
-
- def update_viewports
- @viewport1.tone.set($game_map.screen.tone)
- @viewport1.ox = $game_map.screen.shake
- @viewportX.ox = $game_map.screen.shake
- @viewport2.color.set($game_map.screen.flash_color)
- @viewport3.color.set(0, 0, 0, 255 - $game_map.screen.brightness)
- @viewport1.update
- @viewportX.update
- @viewport2.update
- @viewport3.update
- end
-
- def dispose_viewports
- @viewport1.dispose
- @viewport2.dispose
- @viewport3.dispose
- @viewportX.dispose
- end
- end
复制代码
樓上的code多加兩句就可以了吧
指定事件的方法: 在事件的名稱加上
測試圖: |
评分
-
查看全部评分
|