Release 0.0.1.8.8.7
This commit is contained in:
1 parent
3c8a17aa78
commit
c7beab414c
16283 files changed
+768761
-2
No files matched your search
@@ -0,0 +1,79 @@
|
||||
#==============================================================================
|
||||
# ** Game_Timer
|
||||
#------------------------------------------------------------------------------
|
||||
# This class handles timers. Instances of this class are referenced by
|
||||
# $game_timer.
|
||||
#==============================================================================
|
||||
|
||||
class Game_Timer
|
||||
attr_accessor :count
|
||||
#--------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
#--------------------------------------------------------------------------
|
||||
def initialize
|
||||
@count = 0
|
||||
@working = false
|
||||
@chkMode = nil
|
||||
@chkMax = nil
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Frame Update
|
||||
#--------------------------------------------------------------------------
|
||||
def update
|
||||
if @working
|
||||
return if @chkMode
|
||||
if @count > 0
|
||||
@count -= 1
|
||||
off if @count <= 0
|
||||
end
|
||||
end
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Start
|
||||
#--------------------------------------------------------------------------
|
||||
def start(count)
|
||||
@count = count
|
||||
@working = true
|
||||
end
|
||||
def startChkMode(count)
|
||||
@count = count
|
||||
@chkMode = true
|
||||
@working = true
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Stop
|
||||
#--------------------------------------------------------------------------
|
||||
def stop
|
||||
@working = false
|
||||
end
|
||||
|
||||
def off
|
||||
@chkMode = nil
|
||||
@chkMax = nil
|
||||
@count = -1
|
||||
@working = false
|
||||
SceneManager.scene.spriteset.timer_sprite_force_update #force update to make spirte visible to false
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Determine if Working
|
||||
#--------------------------------------------------------------------------
|
||||
def working?
|
||||
@working
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Get Seconds
|
||||
#--------------------------------------------------------------------------
|
||||
def sec
|
||||
@count / Graphics.frame_rate
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Processing When Timer Reaches 0
|
||||
#--------------------------------------------------------------------------
|
||||
#def on_expire
|
||||
# BattleManager.abort
|
||||
#end
|
||||
#--------------------------------------------------------------------------
|
||||
# * 417 custom
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user