Esempio n. 1
0
	void OnNtfMatch(NtfMatch ntf)
	{
		//Debug.Log("Lobby.OnNtfMatch " + ntf.ToString() + "\n");

		JgRefs.ins_.appClient.StateObject().indexInRoom = ntf.LocalId;

		JVCMgr.ins_.PopView();

		bool isCho = ntf.LocalId == 0;
		JgRefs.ins_.game.appPlayerIsCho = isCho;

		if (isCho)
			JgRefs.ins_.vcSangcharimCho.ShowPopup();
		else
			JgRefs.ins_.vcSangcharimHan.ShowPopup();
	}
Esempio n. 2
0
	//public JgNation virtualPlayerNation;
	public void SetPlayerNationsAndNewMatch()
	{
		NtfMatch ntf = new NtfMatch();
		bool isCho = false;//(new System.Random()).Next() % 2 == 0;
		//if (virtualPlayerNation == JgNation.kCho)

		if (isCho)
		{
			choState = states[0];
			hanState = states[1];
		}
		else
		{
			choState = states[1];
			hanState = states[0];
		}

		choState.indexInRoom = 0;
		hanState.indexInRoom = 1;

		ntf.LocalId = choState.indexInRoom;
		SendMessageToClient(choState, (byte)JgS2C_Msgs.kNtfMatch, ntf);

		ntf.LocalId = hanState.indexInRoom;
		SendMessageToClient(hanState, (byte)JgS2C_Msgs.kNtfMatch, ntf);
	}