Commit 7ad31bb9 authored by wangxuewei's avatar wangxuewei

[提交人]:王雪伟

[提交简述] :幸福农场
[实现方案] :看视频加速
parent 40cea6af
......@@ -110,6 +110,8 @@ class GameActivity : UnityPlayerActivity() {
GameApiClient.gameApi.getUnlockLand(id, type).compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<StatusEntity>() {
override fun onSuccess(result: StatusEntity?) {
result?.id = id
result?.type = type
Log.d("wxw", "解锁地块" + Utils.obj2Str(result))
callback?.onLandUnLockSuccess(true, Utils.obj2Str(result))
}
......@@ -222,8 +224,8 @@ class GameActivity : UnityPlayerActivity() {
}
//看视频领取加速剂
fun getVideoAcceleratorsReceive(callback: IUnitySendMessageCallback?) {
GameApiClient.gameApi.getVideoAcceleratorsReceive().compose(RxSchedulers.observableIO2Main())
fun getVideoAcceleratorsReceive(callback: IUnitySendMessageCallback?,id: Int) {
GameApiClient.gameApi.getVideoAcceleratorsReceive(id).compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<StatusEntity>() {
override fun onSuccess(result: StatusEntity?) {
Log.d("wxw", "看视频领取加速剂" + Utils.obj2Str(result))
......
......@@ -11,6 +11,15 @@ public class StatusEntity {
private int num;
private int cloudSecond;
private int awardCash;
private int type;
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getId() {
return id;
......
......@@ -118,5 +118,5 @@ interface IGameApi {
* @return
*/
@POST(NetConfig.Game.URL_GAME_INCR_ACCELERATORS)
fun getVideoAcceleratorsReceive(): Observable<Response<StatusEntity>>
fun getVideoAcceleratorsReceive(@Query("id") id: Int): Observable<Response<StatusEntity>>
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment