赞 | 32 |
VIP | 146 |
好人卡 | 11 |
积分 | 38 |
经验 | 143619 |
最后登录 | 2024-6-29 |
在线时间 | 1966 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3846
- 在线时间
- 1966 小时
- 注册时间
- 2013-1-3
- 帖子
- 9536
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
这个是@迅雷進 的影子脚本,只能通过修改坐标来调影子,胖一点的人物对不上
怎样能显示在每个角色的正中央?
- #==============================================================================
- # ■ Sprite_Shadow_Module
- #==============================================================================
- module Sprite_Shadow_Module
- #--------------------------------------------------------------------------
- # ● 解放
- #--------------------------------------------------------------------------
- def dispose
- if @character_shadow != nil then
- @character_shadow.bitmap.dispose
- @character_shadow.dispose
- end
- super
- end
- #--------------------------------------------------------------------------
- # ● 影子的作成
- #--------------------------------------------------------------------------
- def character_shadow_set
- @character_shadow = Sprite.new(self.viewport)
- @character_shadow.bitmap = RPG::Cache.picture("shadow")
- @character_shadow.z = 1
- @character_shadow.opacity = 102
- update_character_shadow
- end
- #--------------------------------------------------------------------------
- # ● 影子的更新
- #--------------------------------------------------------------------------
- def update_character_shadow
- if @character_shadow == nil then
- return
- end
- @character_shadow.x = self.x - self.ox - 5
- @character_shadow.y = self.y- (self.oy / 2.5) + 5
- @character_shadow.visible = (self.visible and @character_name != "")
- @character_shadow.opacity = 102
- end
- end
- #==============================================================================
- # ■ Game_Event
- #==============================================================================
- class Game_Event < Game_Character
- attr_reader :event
- end
- #==============================================================================
- # ■ Sprite_Character
- #==============================================================================
- class Sprite_Character < RPG::Sprite
- include(Sprite_Shadow_Module)
- alias :Character_Shadow_initialize :initialize
- def initialize(viewport, character = nil)
- Character_Shadow_initialize(viewport, character)
- case @character
- when Game_Player then
- character_shadow_set
- when Game_Event then
- if @character.event.name.include?("s_") == true then
- character_shadow_set
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- alias :update_Character_Shadow :update
- def update
- update_Character_Shadow
- update_character_shadow
- end
- end
复制代码 |
评分
-
查看全部评分
|