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