Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.