Add app_active.lua

This commit is contained in:
David Capello 2018-11-03 13:39:43 -03:00
parent 330da97467
commit 4d7f3036d8

15
scripts/app_active.lua Normal file
View File

@ -0,0 +1,15 @@
-- Copyright (C) 2018 Igara Studio S.A.
--
-- This file is released under the terms of the MIT license.
-- Read LICENSE.txt for more information.
local s = Sprite(32, 64)
assert(s == app.activeSprite)
assert(s == app.activeCel.sprite)
assert(s == app.activeFrame.sprite)
assert(1 == app.activeFrame.frameNumber)
assert(0.100 == app.activeFrame.duration) -- Default frame duration
app.command.NewFrame()
assert(2 == app.activeFrame.frameNumber)
assert(0.100 == app.activeFrame.duration) -- Default frame duration