Update 6.8

This commit is contained in:
chardub
2026-07-10 15:42:06 -04:00
parent 5b85e72cb2
commit 6a6f126a18
7871 changed files with 493194 additions and 224826 deletions
+46
View File
@@ -0,0 +1,46 @@
class Game_Character
attr_accessor :floating
attr_reader :float_offset
alias game_character_init initialize
def initialize(*args)
game_character_init(*args)
@floating = false
@float_phase = 0.0
@float_offset = 0
end
alias game_character_update update
def update
game_character_update
if @floating
update_floating
else
@float_offset = 0
@float_phase = 0.0
end
end
private
def update_floating
@float_phase += 0.1
amplitude = 2.5
@float_offset = Math.sin(@float_phase) * amplitude
end
end
class Sprite_Character < RPG::Sprite
alias floating_update update
def update
floating_update
return if @character.nil?
return unless @character.floating
# Shift the sprite visually only
self.oy = self.oy + @character.float_offset
end
end