public void RessourceCheck() { bool resetCurrentSelectedAction = false; if (_currentSelectedAction == Action_1 || _currentSelectedAction == null) { if (!_resourceMan.HasEnoughResource(_platformData.Platform1_Cost)) { Action_1.Hide(); //_currentSelectedAction = null; resetCurrentSelectedAction = true; Build(false); } } if (_currentSelectedAction == Action_2 || _currentSelectedAction == null) { if (!_resourceMan.HasEnoughResource(_platformData.Platform2_Cost)) { Action_2.Hide(); //_currentSelectedAction = null; resetCurrentSelectedAction = true; Build(false); } } if (resetCurrentSelectedAction) { _currentSelectedAction = null; } }
public void HideAction() { actionUI.Hide(); }