public void OnBuyButton()
 {
     ConfirmPopup.Setup(string.Format("Are you sure to buy '{0}'?", _product.name), () => {
         MyStatus.instance.money.value -= _product.price;
         // TODO 아이템 효과
     });
 }
Exemplo n.º 2
0
 void OnJobSelected(WorkListElement.Work job)
 {
     if (job.health <= MyStatus.instance.health)
     {
         ConfirmPopup.Setup(string.Format("Are you sure do work '{0}'?", job.name), () => {
             MyStatus.instance.health.value  -= job.health;
             MyStatus.instance.money.value   += job.payment;
             MyStatus.instance.lastWork.value = VoteManager.currentVote.day;
             GameObject.Destroy(gameObject);
         });
     }
 }
Exemplo n.º 3
0
 public void OnPointerDown(PointerEventData eventData)
 {
     ConfirmPopup.Setup("So sleepy... go to bed?", gotoSleep);
 }