This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sequenceData = { | |
{ | |
name = "normalRun", --name of animation sequence | |
start = 1, --starting frame index | |
count = 8, --total number of frames to animate consecutively before stopping or looping | |
time = 800, --optional, in milliseconds; if not supplied, the sprite is frame-based | |
loopCount = 0, --optional. 0 (default) repeats forever; a positive integer specifies the number of loops | |
loopDirection = "forward" --optional, either "forward" (default) or "bounce" which will play forward then backwards through the sequence of frames | |
} --if defining more sequences, place a comma here and proceed to the next sequence sub-table | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sequenceData = { | |
{ | |
name = "fastRun", | |
frames = { 1,2,4,5,6,7 }, --specific order of frame indexes from the image sheet | |
time = 250, | |
loopCount = 0 | |
} --if defining more sequences, place a comma here and proceed to the next sequence sub-table | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sequenceData = { | |
{ name="normalRun", start=1, count=8, time=800 }, | |
{ name="fastRun", frames={ 1,2,4,5,6,7 }, time=250, loopCount=0 } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function mySpriteListener( event ) | |
if ( event.phase == "ended" ) then | |
local thisSprite = event.target --"event.target" references the sprite | |
thisSprite:setSequence( "fastRun" ) --switch to "fastRun" sequence | |
thisSprite:play() --play the new sequence; it won't play automatically! | |
end | |
end | |
animation:addEventListener( "sprite", mySpriteListener ) --add a sprite listener to your sprite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.genesis-nav-menu .widget { | |
float: right; | |
} | |
.genesis-nav-menu .simple-social-icons ul li { | |
margin-bottom: 0 !important; | |
margin-top: 0.7rem !important; | |
} |