コード例 #1
0
ファイル: col.cs プロジェクト: rahmanroohi/LordOfDigits
    public void ClickBall(  )
    {
        if (this.gameObject.GetComponentInChildren <Text>().text == sharedobj.getCurentNumber().ToString())
        {
            if (!sharedobj.getHardLevel())
            {
                this.gameObject.GetComponent <Image>().sprite        = DisableBall;
                this.gameObject.GetComponent <Button>().interactable = false;
            }
            sharedobj.setCurentNumber(sharedobj.getCurentNumber() + 1);

            sharedobj.setPlayersScoreListIndex(sharedobj.getPlayersScoreListIndex(sharedobj.getPlayersTurn() - 1) + 1,
                                               sharedobj.getPlayersTurn() - 1);
            //Debug.Log("score player num" +sharedobj.getPlayersTurn() + " : " + sharedobj.getPlayersScoreListIndex(sharedobj.getPlayersTurn()-1));
        }
    }
コード例 #2
0
 public void setting(bool hard)
 {
     setshared();
     if (hard)        // is hard
     {
         sharedobj.setHardLevel(true);
         btn_hard.GetComponent <Image>().sprite = btn[1];
         btn_easy.GetComponent <Image>().sprite = btn[0];
     }
     else          // is easy
     {
         sharedobj.setHardLevel(false);
         btn_hard.GetComponent <Image>().sprite = btn[0];
         btn_easy.GetComponent <Image>().sprite = btn[1];
     }
     Debug.Log(sharedobj.getHardLevel());
 }