Skip to content

Instantly share code, notes, and snippets.

@tariqhamid
Forked from mumez/EcTimelineExample1.st
Created February 25, 2016 10:23
Show Gist options
  • Save tariqhamid/d4b19061488b5c2d404e to your computer and use it in GitHub Desktop.
Save tariqhamid/d4b19061488b5c2d404e to your computer and use it in GitHub Desktop.
Upcoming EnchantFromAmber example
EcGameProgram subclass: #EcTimelineExample
instanceVariableNames: ''
package: 'Enchant-Examples'!
!EcTimelineExample methodsFor: 'actions'!
prepareBeforeLoad
self game assetsBasePath: './game-img/'.
self game preloadAssets: #('chara1.png').
self game fps: 20.
!
prepareOnLoad
| scene bear |
scene := self game rootScene.
bear := scene addSprite: (32@32) imageName: 'chara1.png' frame: #(6 6 7 7) at: 1@1.
bear tl
moveBy: 288@0 time: 90;
scaleTo: -1 time: 1 easing: 10;
moveBy: -288@0 time: 90;
scaleTo: 1 time: 1 easing: 10;
loop
! !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment