示例#1
0
文件: Cell.cs 项目: silverweed/colony
 public void Refine(RefinedResource what)
 {
     RefineHoneySprite.SetActive((what & RefinedResource.Honey) != 0);
     RefineRoyalJellySprite.SetActive((what & RefinedResource.RoyalJelly) != 0);
     if (what == RefinedResource.None) {
         UseAsStorage();
         return;
     }
     RefineSprite.SetActive(true);
     state = State.Refine;
     refined = what;
     if (OnStateChange != null)
         OnStateChange(gameObject);
 }
示例#2
0
 public void Refine(RefinedResource what)
 {
     RefineHoneySprite.SetActive((what & RefinedResource.Honey) != 0);
     RefineRoyalJellySprite.SetActive((what & RefinedResource.RoyalJelly) != 0);
     if (what == RefinedResource.None)
     {
         UseAsStorage();
         return;
     }
     RefineSprite.SetActive(true);
     state   = State.Refine;
     refined = what;
     if (OnStateChange != null)
     {
         OnStateChange(gameObject);
     }
 }
示例#3
0
        private void refine(RefinedResource what)
        {
            foreach (Cell cell in MouseActions.Instance.GetSelected <Cell>())
            {
                switch (cell.CellState)
                {
                case Cell.State.CreateEgg:
                    TextController.Instance.Add("Cannot use cell for refining while larva is in!");
                    break;

                default:
                    cell.Refine(what);
                    UIController.Instance.SetBPRefining(what);
                    break;
                }
            }
        }