Example #1
0
	public void UnmakeTarget()
	{
		//transform.GetComponent<Image>().overrideSprite = empty;
		transform.FindChild ("Text").GetComponent<Text> ().color = unselected_color;
		transform.FindChild ("Image").GetComponent<Image> ().sprite = waitingClass == "sh" ? untarget_ship : untarget_submarine;
		TargetPlayer = null;
	}
Example #2
0
        public WaitingPlayerResult GetWaitingPlayersList(string excludedEmail)
        {
            logger.Info("GetWaitingPlayr ");

            WaitingPlayerResult result = new WaitingPlayerResult();

            foreach (string email in waitingPlayers)
            {
                if (email == excludedEmail)
                {
                    continue;
                }

                WaitingPlayer   waitingPlayer = new WaitingPlayer();
                PlayerScoreData playerData    = matixData.GetWaitingPlayerData(email);

                waitingPlayer.NickName         = userEmailToNickname[email];
                waitingPlayer.TotalGames       = playerData.TotalNumberOfGames;
                waitingPlayer.TotalScore       = playerData.TotalScore;
                waitingPlayer.NumberOfWinnings = playerData.NumberOfWinnings;

                result.WaitingPlayerslist.Add(waitingPlayer);
            }

            WaitingPlayer waitingPlayer1 = new WaitingPlayer();

            waitingPlayer1.NickName         = "Player1";
            waitingPlayer1.TotalGames       = 15;
            waitingPlayer1.TotalScore       = 85;
            waitingPlayer1.NumberOfWinnings = 7;
            result.WaitingPlayerslist.Add(waitingPlayer1);

            waitingPlayer1                  = new WaitingPlayer();
            waitingPlayer1.NickName         = "Player2";
            waitingPlayer1.TotalGames       = 150;
            waitingPlayer1.TotalScore       = -6585;
            waitingPlayer1.NumberOfWinnings = 87;
            result.WaitingPlayerslist.Add(waitingPlayer1);

            waitingPlayer1                  = new WaitingPlayer();
            waitingPlayer1.NickName         = "Player__3";
            waitingPlayer1.TotalGames       = 25;
            waitingPlayer1.TotalScore       = 45;
            waitingPlayer1.NumberOfWinnings = 17;
            result.WaitingPlayerslist.Add(waitingPlayer1);

            result.Status = OperationStatusnEnum.Success;

            return(result);
        }
Example #3
0
	public void MakeTarget()
	{
		if (TargetPlayer != null)
			TargetPlayer.UnmakeTarget();

		//transform.GetComponent<Image>().overrideSprite = targeted;
		transform.FindChild ("Text").GetComponent<Text> ().color = selected_color;
		transform.FindChild ("Image").GetComponent<Image> ().sprite = waitingClass == "sh" ? target_ship : target_submarine;
		
		TargetPlayer = this;
		MultiplayerScript.Instance.isShip = waitingClass == "su";
		MultiplayerScript.Instance.ToggleSide ();
		MultiplayerScript.Instance.SwapStartButtons ();
	}