Esempio n. 1
0
    void Update()
    {
        if (ControlGame.instance.newPlayer)
        {
            ////////////No Quitar/////////
            ControlGame.instance.newPlayer = false;
            ////////////////////////

            lblPlayer.text = "Player: " + ControlGame.instance.currentPlayer.name + " of  " + ControlGame.instance.players.Count;
            lblTeam.text   = "Team: " + ControlGame.instance.currentPlayer.team + " of  " + ControlGame.instance.dictionaryTeams.Count;

            lblHits.text     = "";
            lblInfoHits.text = "";
        }
        if (ControlGame.instance.newThrow)
        {
            ////////////No Quitar/////////
            ControlGame.instance.newThrow = false;
            ////////////////////////

            lblHits.text = "Points: " + ControlGame.instance.hitsString;

            if (ControlGame.instance.hitsString.Contains("NONE"))
            {
                lblInfoHits.text = "";
            }
            else
            {
                int       valuePoint = ControlGame.instance.pointsHit;
                string    colorPoint = ControlGame.instance.colorHit;
                FactorHit factor     = ControlGame.instance.factorHit;
                lblInfoHits.text = "Info point: " + valuePoint.ToString() + "  " + colorPoint + " " + factor.ToString();
            }
        }
    }
Esempio n. 2
0
    private void mapStringHit()
    {
        string[] arrayHit = hitsString.Split('-');
        colorHit = arrayHit[1];
        if (hitsString.Contains("EYE"))
        {
            factorHit = FactorHit.EYE;
            pointsHit = -1;
        }
        else
        {
            pointsHit = Int32.Parse(arrayHit[0]);

            positionHit = Int32.Parse(arrayHit[2]);


            if (colorHit.Contains("R") || colorHit.Contains("G"))
            {
                if (positionHit == 1)
                {
                    factorHit = FactorHit.DOUBLE;
                }
                else if (positionHit == 2)
                {
                    factorHit = FactorHit.TRIPLE;
                }
            }
            else
            {
                factorHit = FactorHit.SINGLE;
            }
        }
    }