def create_battleback1
@back1_sprite=Sprite.new(@viewport1)
@back1_sprite.bitmap= battleback1_bitmap
@back1_sprite.z=0
@back1_sprite.opacity=128
center_sprite(@back1_sprite)
end
def create_battleback2
end
# ● 生成由地图画面加工而来的战场背景
#--------------------------------------------------------------------------
def create_blurry_background_bitmap
if $BTEST
p "你执行了测试战斗"
color_bg=Color.new(0,0,0)
bitmap=Bitmap.new(Graphics.width, Graphics.height)
bitmap.fill_rect(0,0,Graphics.width,Graphics.height,color_bg)
bitmap
else
source = SceneManager.background_bitmap
if source
bitmap = Bitmap.new(Graphics.width, Graphics.height)
bitmap.stretch_blt(bitmap.rect, source, source.rect)
bitmap.blur
bitmap
end
end
end
def battleback1_bitmap
create_blurry_background_bitmap
end
def update
update_battleback1
update_enemies
update_actors
update_pictures
update_timer
update_viewports
end
# ● 释放战场背景的精灵(墙壁)
#--------------------------------------------------------------------------
def dispose_battleback2
end
def dispose_battleback1
if @back1_sprite
p "战斗背景图释放了"
@back1_sprite.bitmap.dispose
@back1_sprite.dispose
end
end
end
2.为敌人添加了一个简易血条。(肥肠丑陋)
class Sprite_Enemy_Hp