private void OnChangeResource(IResourceble resource) { if (_type == resource.Type) { _text.text = resource.Type.ToString() + ": " + resource.Amount.ToString(); } }
public IScreenShotable OnSwitch(IResourceble slideMenuItem, IScreenShotable screenShotable, int position) { if (slideMenuItem.Name == ContentFragment.CLOSE) { return(screenShotable); } else { return(ReplaceFragment(screenShotable, position)); } }
public IScreenShotable OnSwitch(IResourceble p0, IScreenShotable p1, int p2) { switch (p0.Name) { case ContentFragment.CLOSE: return(p1); default: return(ReplaceFragment(p1, p2)); } }
private void OnSendResource(IResourceble resource) { for (int i = 0; i < _resorces.Length; i++) { if (_resorces[i].Type == resource.Type) { _resorces[i].Add(resource.Amount); ChangeResource?.Invoke(_resorces[i]); } } }
public IResourceble GetResources(IResourceble resource) { resource.Add(Random.Range(_minValue, _maxValue)); return(resource); }
private void SendResources(IResourceble resource) => SendResource?.Invoke(resource);