Last active
February 25, 2016 10:23
-
-
Save mumez/5584318 to your computer and use it in GitHub Desktop.
Upcoming EnchantFromAmber example
This file contains 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
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