Slide 13
Slide 13 text
// Input
PublishSubject subject =
PublishSubject.create();
!
@Override
public boolean touchDown(float x, float y, int pointer, int button) {
subject.onNext(GameMaster.Action.CHARACTER_PREPARE_JUM
return false;
}
!
@Override
public boolean tap(float x, float y, int count, int button) {
subject.onNext(GameMaster.Action.CHARACTER_JUMP);
return false;
}
!
…
!
public Observable getActions() {return subject;}