Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/poisonousjohn/ailovereel
Cocos2d implementation of 3d slot machine reel
https://github.com/poisonousjohn/ailovereel
Last synced: 5 days ago
JSON representation
Cocos2d implementation of 3d slot machine reel
- Host: GitHub
- URL: https://github.com/poisonousjohn/ailovereel
- Owner: PoisonousJohn
- Created: 2013-04-02T11:45:07.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-02T15:12:52.000Z (over 11 years ago)
- Last Synced: 2023-03-22T20:42:30.232Z (over 1 year ago)
- Language: Objective-C
- Size: 125 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
AiloveReel
==========Cocos2d implementation of 3d slot machine reel
Usage example
```objective-c
AiloveReel *reelLocal = [AiloveReel reelWithTexture: texture polygonsCount: 19 symbolSize:CGSizeMake(32, 32) symbolsCount: 3 reelHeight: 32*2 ];
reelLocal.position = ccp(50, 100);
reelLocal.spinningBlock = ^{
reelLocal.textureColumn = 2;
};
reelLocal.slowingDownBlock = ^{
reelLocal.textureColumn = 0;
};
[self addChild:reelLocal];
[reelLocal spinWithVelocity:200];
[reelLocal runAction:[CCSequence actionOne:[CCDelayTime actionWithDuration:3.5] two:[CCCallBlock actionWithBlock:^{
[reelLocal stopAtIndex:i];
}]]];
```Limitations
=========
* Symbols texture should be vertically oriented, symbols goes one by one
* Symbols texture width should be symbolWidth * columns
* Symbols texture should start and end with the same symbol in order to tile NPOT texture.