mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Finishing footsplashes for the water room.
With these scripts the map properly loops and the footsplashes do as well. Footsplashes were also made bigger.
This commit is contained in:
parent
2e73c99b8a
commit
d403608189
4 changed files with 52 additions and 8 deletions
|
|
@ -31,6 +31,19 @@ module Script
|
|||
return false
|
||||
end
|
||||
|
||||
def self.fix_footsplashes(xDelta, yDelta)
|
||||
$scene.fix_footsplashes(xDelta, yDelta)
|
||||
end
|
||||
|
||||
def self.move_player_relative(x, y)
|
||||
$game_player.x += x
|
||||
$game_player.y += y
|
||||
$game_player.real_x += x * 4 * 32
|
||||
$game_player.real_y += y * 4 * 32
|
||||
$game_map.display_x += x * 4 * 32
|
||||
$game_map.display_y += y * 4 * 32
|
||||
end
|
||||
|
||||
def self.eve_x(name)
|
||||
for event in $game_map.events.values
|
||||
if event.name == name
|
||||
|
|
|
|||
|
|
@ -25,4 +25,11 @@ class Sprite_Footprint < Sprite
|
|||
dispose
|
||||
end
|
||||
end
|
||||
|
||||
def correctX(xDelta)
|
||||
@real_x += xDelta*4*32
|
||||
end
|
||||
def correctY(yDelta)
|
||||
@real_y += yDelta*4*32
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,17 +2,28 @@ class Sprite_Footsplash < Sprite
|
|||
def initialize(viewport, direction, x, y)
|
||||
|
||||
super(viewport)
|
||||
y = y + 1
|
||||
y = y + 2
|
||||
@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
|
||||
case direction
|
||||
when 2
|
||||
@real_y -= 32
|
||||
when 4
|
||||
@real_x += 32
|
||||
when 6
|
||||
@real_x -= 32
|
||||
when 8
|
||||
@real_y += 32
|
||||
end
|
||||
|
||||
self.zoom_x = 2
|
||||
self.zoom_y = 2
|
||||
self.ox = 40
|
||||
self.oy = 80
|
||||
self.bitmap = RPG::Cache.misc('foot_splash')
|
||||
self.src_rect.set(0, 0, 96, 96)
|
||||
self.src_rect.set(0, 0, 80, 80)
|
||||
update
|
||||
end
|
||||
|
||||
|
|
@ -23,12 +34,19 @@ class Sprite_Footsplash < Sprite
|
|||
self.y = (@real_y - $game_map.display_y + 3) / 4 + 32
|
||||
|
||||
self.opacity -= 6
|
||||
frameIndex = 12 - (self.opacity / 21)
|
||||
frameIndex = 20 - (self.opacity / 13)
|
||||
frameX = frameIndex % 4
|
||||
frameY = frameIndex / 4
|
||||
self.src_rect.set(96*frameX, 96*frameY, 96, 96)
|
||||
self.src_rect.set(80*frameX, 80*frameY, 80, 80)
|
||||
if self.opacity == 0
|
||||
dispose
|
||||
end
|
||||
end
|
||||
|
||||
def correctX(xDelta)
|
||||
@real_x += xDelta*4*32
|
||||
end
|
||||
def correctY(yDelta)
|
||||
@real_y += yDelta*4*32
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -354,4 +354,10 @@ class Spriteset_Map
|
|||
def new_footsplash(direction, x, y)
|
||||
@footprint_sprites << Sprite_Footsplash.new(@viewport, direction, x, y)
|
||||
end
|
||||
def fix_footsplashes(x, y)
|
||||
for footprint in @footprint_sprites
|
||||
footprint.correctX(x)
|
||||
footprint.correctY(y)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue