https://github.com/maxvol/rxgameplaykit
RxGameplayKit (based on RxSwift)
https://github.com/maxvol/rxgameplaykit
gameplaykit ios rx rxswift swft
Last synced: 2 months ago
JSON representation
RxGameplayKit (based on RxSwift)
- Host: GitHub
- URL: https://github.com/maxvol/rxgameplaykit
- Owner: maxvol
- License: mit
- Created: 2019-01-27T06:10:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T03:59:07.000Z (over 6 years ago)
- Last Synced: 2025-01-10T08:08:57.125Z (9 months ago)
- Topics: gameplaykit, ios, rx, rxswift, swft
- Language: Swift
- Size: 16.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RxGameplayKit
RxGameplayKit (based on RxSwift)*NB*: It is probably counterproductive to use it with `GKSKNodeComponent` or `GKSCNNodeComponent` which already implement the delegate methods, but with nodeless agents and non-SpriteKit/SceneKit usage it may come in handy.
Basic usage.
```swift
agent
.rx
.willUpdate
.subscribe { event in
switch event {
case .next(let agent):
// TODO: ...
break
default:
break
}
}
.disposed(by: disposeBag)agent
.rx
.didUpdate
.subscribe { event in
switch event {
case .next(let agent):
// TODO: ...
break
default:
break
}
}
.disposed(by: disposeBag)```
Carthage setup.
```
github "maxvol/RxGameplayKit" ~> 0.0.2```