Merge pull request #291 from nitta-lab-2022/o_game
GameViewModelの変更
commit 85ff7bd9b5934239810c94334563e37485f98e82
2 parents 4397275 + 25ec9a3
ShimokawaGakuto authored on 10 Nov 2022
Showing 1 changed file
View
20
app/src/main/java/org/ntlab/irisclient/TestGameActivity.java
public void onResponse(Call<List<Member>> call, Response<List<Member>> response) {
if (response.isSuccessful()){
System.out.println("通信成功");
((Iris) getApplication()).setMemberList(response.body());
Intent intent = new Intent(TestGameActivity.this, GameMasterActivity.class);
startActivity(intent);
}
}
@Override
public void onFailure(Call<List<Member>> call, Throwable t) {
System.out.println("通信失敗");
System.out.println(t);
}
});
 
Intent intent = new Intent(TestGameActivity.this, GameMasterActivity.class);
startActivity(intent);
}
});
 
//RedAgentとして参加
public void onResponse(Call<List<Member>> call, Response<List<Member>> response) {
if (response.isSuccessful()){
System.out.println("通信成功:createDrawTest");
((Iris) getApplication()).setMemberList(response.body());
Intent intent = new Intent(TestGameActivity.this, GameMemberActivity.class);
startActivity(intent);
}
}
@Override
public void onFailure(Call<List<Member>> call, Throwable t) {
System.out.println("通信失敗:createDrawTest");
System.out.println(t);
}
});
 
Intent intent = new Intent(TestGameActivity.this, GameMemberActivity.class);
startActivity(intent);
}
});
 
//BlueSpyとして参加
public void onResponse(Call<List<Member>> call, Response<List<Member>> response) {
if (response.isSuccessful()){
System.out.println("通信成功:createDrawTest");
((Iris) getApplication()).setMemberList(response.body());
Intent intent = new Intent(TestGameActivity.this, GameMasterActivity.class);
startActivity(intent);
}
}
@Override
public void onFailure(Call<List<Member>> call, Throwable t) {
System.out.println("通信失敗:createDrawTest");
System.out.println(t);
}
});
 
Intent intent = new Intent(TestGameActivity.this, GameMasterActivity.class);
startActivity(intent);
}
});
 
//BlueAgentとして参加
public void onResponse(Call<List<Member>> call, Response<List<Member>> response) {
if (response.isSuccessful()){
System.out.println("通信成功:createDrawTest");
((Iris) getApplication()).setMemberList(response.body());
Intent intent = new Intent(TestGameActivity.this, GameMemberActivity.class);
startActivity(intent);
}
}
@Override
public void onFailure(Call<List<Member>> call, Throwable t) {
System.out.println("通信失敗:createDrawTest");
System.out.println(t);
}
});
 
Intent intent = new Intent(TestGameActivity.this, GameMemberActivity.class);
startActivity(intent);
}
});
 
//backボタン