Question by
mathidegroodt · Aug 04, 2021 at 05:26 PM ·
clickcodepagebasicscombobasic programming
Combo cash per click
So I have this script where you will get 10 cash if you click on the button but 11 cash if you click on the button when 2 images are alligned. But I wanted to make a combo mechanism where you will get 12, 13, 14,... cash and so on if you keep clicking at the button when the 2 images are alligned. (And a reset where you will get back 11 cash if you click when tw 2 images are NOT alligned.) Anyone who could help?
{
Vector3 distance = MeterRectTransform.position - ZoneRectTransform.position;
if (distance.magnitude < 15)
Cash += 11;
else
Cash += 10;
CashTotalText.text = Cash.ToString("0");
}
Comment
Your answer
Follow this Question
Related Questions
Combo mechanism for button clicker? 1 Answer
How to to draw texture on object using code 2 Answers
Combo in bolt 0 Answers
any triple mouse click c# script? 2 Answers
Click counter 1 Answer