shit works mostly, able to proceed to picture taking now
This commit is contained in:
@@ -32,10 +32,10 @@ namespace YJMPD_UWP.Model
|
||||
|
||||
public void HandleMessage(JObject o)
|
||||
{
|
||||
Debug.WriteLine("Reached HandleMessage in API");
|
||||
Debug.WriteLine(o.ToString());
|
||||
Command c = (Command)Enum.Parse(typeof(Command), o["command"].ToString());
|
||||
|
||||
switch(c)
|
||||
switch (c)
|
||||
{
|
||||
case Command.GameFound:
|
||||
GameFound();
|
||||
@@ -44,6 +44,13 @@ namespace YJMPD_UWP.Model
|
||||
Debug.WriteLine("Played joined");
|
||||
PlayerJoined(o[Command.PlayerJoined.ToString()].ToString());
|
||||
break;
|
||||
case Command.Picture:
|
||||
if (o["selected"].ToObject<bool>() == true)
|
||||
{
|
||||
Debug.WriteLine("Selected player taking picture");
|
||||
App.Game.Selected = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
//Do nothing
|
||||
break;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace YJMPD_UWP.Model
|
||||
|
||||
public List<Player> Players { get; private set; }
|
||||
|
||||
public bool Selected { get; private set; }
|
||||
public bool Selected { get; set; }
|
||||
|
||||
private void UpdateGameStatus(GameStatus status)
|
||||
{
|
||||
|
||||
@@ -112,7 +112,6 @@ namespace YJMPD_UWP.Model
|
||||
|
||||
public void HandleMessage(string data)
|
||||
{
|
||||
Debug.WriteLine(data);
|
||||
JObject o = JObject.Parse(data);
|
||||
App.Api.HandleMessage(o);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user