Example #1
0
    // Use this for initialization
    void Start()
    {
        dpm = GameObject.Find("GameManager").GetComponent <DicePointManager>();
        dpm.GetDP();

        this.dpText      = this.GetComponent <Text>();
        this.dpText.text = dpm.GetDP().ToString();
    }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     if (!button.interactable)
     {
         if (dpm.GetDP() >= cost)
         {
             button.interactable = true;
         }
     }
     else
     {
         if (dpm.GetDP() < cost)
         {
             button.interactable = false;
         }
     }
 }
Example #3
0
 // Update is called once per frame
 void Update()
 {
     this.dpText.text = dpm.GetDP().ToString();
 }