-- -------------------------------------------------------------------------------- -- FILE: sheep_puff_ball.lua -- DESCRIPTION: -- AUTHOR: Benny Yang (), -- CREATED: 2011/08/11 -------------------------------------------------------------------------------- -- require "lua/entity.lua" require "lua/utilities.lua" bInitialized = false PuffBall_TimeToShrink = 3.5 PuffBall_ActivateTime = 0 PuffBall_ScriptTime = 0 PuffBall_DoShrinking = false ------------------------------------------------------------------------ -- FUNCTIONS ------------------------------------------------------------------------ function Init ( ) bInitialized = true return end ---------- end of function Init ---------- function shutdown ( ) -- delete self if delete then delete() end return end ---------- end of function shutdown ---------- ------------------------------------------------------------------------ -- MAIN LOOP ------------------------------------------------------------------------ while tick() do PuffBall_ScriptTime = PuffBall_ScriptTime + dt if bInitialized == false then Init() end if (PuffBall_ScriptTime >= PuffBall_TimeToShrink) and not PuffBall_DoShrinking then scaleSmooth(1.0, 1.0, 1.0, 1.5) PuffBall_DoShrinking = true end end ------------------------------------------------------------------------ -- SHUT DOWN SECTION ------------------------------------------------------------------------ -- delete will be handled by IcePrison component shutdown()