2019-08-28 12:19:11 +00:00
|
|
|
-- Copyright (C) 2019 Igara Studio S.A.
|
2018-09-11 21:46:35 +00:00
|
|
|
--
|
|
|
|
-- This file is released under the terms of the MIT license.
|
|
|
|
-- Read LICENSE.txt for more information.
|
|
|
|
|
|
|
|
do
|
2019-08-28 12:19:11 +00:00
|
|
|
local s = Sprite(32, 64)
|
|
|
|
local l = s.layers[1]
|
|
|
|
assert(l.parent == s)
|
2018-09-11 21:46:35 +00:00
|
|
|
assert(l.opacity == 255)
|
|
|
|
assert(l.blendMode == BlendMode.NORMAL)
|
|
|
|
|
|
|
|
l.name = "My Layer"
|
|
|
|
l.opacity = 128
|
|
|
|
l.blendMode = BlendMode.MULTIPLY
|
|
|
|
assert(l.name == "My Layer")
|
|
|
|
assert(l.opacity == 128)
|
|
|
|
assert(l.blendMode == BlendMode.MULTIPLY)
|
2020-10-13 14:52:35 +00:00
|
|
|
|
|
|
|
l.data = "Data"
|
|
|
|
assert(l.data == "Data")
|
2018-09-11 21:46:35 +00:00
|
|
|
end
|