Initial import

This commit is contained in:
2014-04-23 21:59:50 -07:00
commit 2eff2aa3b9
141 changed files with 20827 additions and 0 deletions

57
Scripts/RPG/Game_Timer.rb Normal file
View File

@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
#==============================================================================
# ** Game_Timer
#------------------------------------------------------------------------------
# This class handles timers. Instances of this class are referenced by
# $game_timer.
#==============================================================================
class Game_Timer
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@count = 0
@working = false
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if @working && @count > 0
@count -= 1
on_expire if @count == 0
end
end
#--------------------------------------------------------------------------
# * Start
#--------------------------------------------------------------------------
def start(count)
@count = count
@working = true
end
#--------------------------------------------------------------------------
# * Stop
#--------------------------------------------------------------------------
def stop
@working = 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
end