public void UpAttackSpeed() { if (coin >= upCostAttackSpeed && lm.GetAttackSpeed() > 0.1f) { lm.SetCoin(lm.GetCoin() - upCostAttackSpeed); coin = lm.GetCoin(); coinText.text = coin.ToString(); lm.SetAttackSpeed(lm.GetAttackSpeed() - 0.08f); attackSpeedText.text = lm.GetAttackSpeed().ToString(); } }