コード例 #1
0
 void Handle(Input.BuyCarrotTrigger action)
 {
     if (action.Value == 0)
     {
         OnBuyReaction = Template.CarrotsReaction.DefaultValue;
     }
     else
     {
         OnBuyReaction = "You bought a carrot!";
     }
 }
コード例 #2
0
 void Handle(Input.BuyCarrotTrigger action)
 {
     OnBuyReaction = action.Value == 0 ? Template.CarrotsReaction.DefaultValue : "You bought a carrot!";
 }