mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Added footsplashes
These can be controlled with switch 101, to be primarily used in the Tower area. This isn't finalized yet but works as is atm, will be finished soon.
This commit is contained in:
parent
f2368993d7
commit
cea46f76e8
6 changed files with 48 additions and 1 deletions
|
|
@ -493,8 +493,13 @@ class Game_Character
|
|||
# * Emit Footprint
|
||||
#--------------------------------------------------------------------------
|
||||
def emit_footprint(direction)
|
||||
if $game_map.counter?(@x, @y)
|
||||
if $game_map.counter?(@x, @y) && !$game_switches[101]
|
||||
$scene.new_footprint(direction, @x, @y)
|
||||
end
|
||||
end
|
||||
def emit_footsplash(direction)
|
||||
if $game_map.counter?(@x, @y) && $game_switches[101]
|
||||
$scene.new_footsplash(direction, @x, @y)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -268,5 +268,6 @@ class Game_Player < Game_Character
|
|||
vol = 70 + rand(20)
|
||||
Audio.se_play("Audio/SE/#{name}.wav", (vol * volume).to_i, pitch.to_i)
|
||||
end
|
||||
emit_footsplash(@direction)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -460,6 +460,9 @@ class Scene_Map
|
|||
def new_footprint(direction, x, y)
|
||||
@spriteset.new_footprint(direction, x, y)
|
||||
end
|
||||
def new_footsplash(direction, x, y)
|
||||
@spriteset.new_footsplash(direction, x, y)
|
||||
end
|
||||
def menu_open?
|
||||
@menu.visible || @item_menu.visible
|
||||
end
|
||||
|
|
|
|||
34
scripts/Sprite_Footsplash.rb
Normal file
34
scripts/Sprite_Footsplash.rb
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
class Sprite_Footsplash < Sprite
|
||||
def initialize(viewport, direction, x, y)
|
||||
|
||||
super(viewport)
|
||||
y = y + 1
|
||||
@direction = direction
|
||||
@real_x = x * 4 * 32
|
||||
@real_y = y * 4 * 32
|
||||
|
||||
self.zoom_x = 1
|
||||
self.zoom_y = 1
|
||||
self.ox = 48
|
||||
self.oy = 96
|
||||
self.bitmap = RPG::Cache.misc('foot_splash')
|
||||
self.src_rect.set(0, 0, 96, 96)
|
||||
update
|
||||
end
|
||||
|
||||
def update
|
||||
return if disposed?
|
||||
|
||||
self.x = (@real_x - $game_map.display_x + 3) / 4 + 16
|
||||
self.y = (@real_y - $game_map.display_y + 3) / 4 + 32
|
||||
|
||||
self.opacity -= 6
|
||||
frameIndex = 12 - (self.opacity / 21)
|
||||
frameX = frameIndex % 4
|
||||
frameY = frameIndex / 4
|
||||
self.src_rect.set(96*frameX, 96*frameY, 96, 96)
|
||||
if self.opacity == 0
|
||||
dispose
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -351,4 +351,7 @@ class Spriteset_Map
|
|||
def new_footprint(direction, x, y)
|
||||
@footprint_sprites << Sprite_Footprint.new(@viewport, direction, x, y)
|
||||
end
|
||||
def new_footsplash(direction, x, y)
|
||||
@footprint_sprites << Sprite_Footsplash.new(@viewport, direction, x, y)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ Sprite_Picture
|
|||
Sprite_Timer
|
||||
Sprite_Light
|
||||
Sprite_Footprint
|
||||
Sprite_Footsplash
|
||||
Spriteset_Map
|
||||
|
||||
FastTravel
|
||||
|
|
|
|||
Loading…
Reference in a new issue