Exemple #1
0
 private void OnChangeResource(IResourceble resource)
 {
     if (_type == resource.Type)
     {
         _text.text = resource.Type.ToString() + ": " + resource.Amount.ToString();
     }
 }
Exemple #2
0
 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));
            }
        }
Exemple #4
0
 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]);
         }
     }
 }
Exemple #5
0
 public IResourceble GetResources(IResourceble resource)
 {
     resource.Add(Random.Range(_minValue, _maxValue));
     return(resource);
 }
Exemple #6
0
 private void SendResources(IResourceble resource) => SendResource?.Invoke(resource);