|
@@ -2,7 +2,7 @@ local shape1 = vmath.vector3(660,576,0) -- < 1 >
|
|
|
local shape2 = vmath.vector3(150,500,0)
|
|
|
local shape3 = vmath.vector3(350,250,0)
|
|
|
|
|
|
-function getshape(self) -- < 2 >
|
|
|
+local function getshape(self) -- < 2 >
|
|
|
local node = gui.get_node("slice_box")
|
|
|
local function animate_size(node, shape) -- < 3 >
|
|
|
gui.animate(node, "size", shape, gui.EASING_INOUTCUBIC, 1.75, 2.5, getshape, gui.PLAYBACK_ONCE_FORWARD)
|
|
@@ -19,26 +19,26 @@ function getshape(self) -- < 2 >
|
|
|
end
|
|
|
end
|
|
|
|
|
|
-function init(self) -- < 4 >
|
|
|
+function init(self) -- < 4 >
|
|
|
self.shape_number = 1
|
|
|
getshape(self)
|
|
|
end
|
|
|
|
|
|
--[[
|
|
|
|
|
|
-1.-Here we create 3 local vector3's representing 3 different sizes for use when animating
|
|
|
+1.-Here we create 3 local vector3's representing 3 different sizes for use when animating
|
|
|
the gui node size property.
|
|
|
|
|
|
-2.-getshape() function gets our slice-9 gui node then an if statement is used to check
|
|
|
- the shape_number variable and animate_size is set accordingly and shape_number is
|
|
|
- changed for the next shape.
|
|
|
+2.-getshape() function gets our slice-9 gui node then an if statement is used to check
|
|
|
+ the shape_number variable and animate_size is set accordingly and shape_number is
|
|
|
+ changed for the next shape.
|
|
|
|
|
|
-3.-The local function animate_size() takes in the node and shape vector3 and uses them
|
|
|
- with gui.animate. Here we animate the "size" of the node and after the animation is
|
|
|
- complete getshape function is called again and a different shape "size" will be animated
|
|
|
+3.-The function animate_size() takes in the node and shape vector3 and uses them
|
|
|
+ with gui.animate. Here we animate the "size" of the node and after the animation is
|
|
|
+ complete getshape function is called again and a different shape "size" will be animated
|
|
|
once again.
|
|
|
|
|
|
4.-In the initialize function we set self.shape_number to 1 and call getshape function to
|
|
|
- start the looping chained animation
|
|
|
+ start the looping chained animation.
|
|
|
|
|
|
--]]
|