Esempio n. 1
0
        public int Producing(BlockType location)
        {
            float produce    = 0f;
            var   characters = new List <Character>();
            int   count      = characterPool.GetAllCharactersInBlock(location, out characters);

            if (count == 0)
            {
                return(0);
            }

            foreach (Character character in characters)
            {
                float result = 0f;

                if (character.Location == location)
                {
                    result = character.Efficiency;
                }
                else
                {
                    result = character.Efficiency * coefficients.K_ProfessionCombatibility;
                }

                produce += result * coefficients.K_EfficiencyMultipler;
            }

            return((int)(produce));
        }
Esempio n. 2
0
        public void ViewChars(BlockType location)
        {
            nowShowing = location;
            List <Character> result = new List <Character>();

            pool.GetAllCharactersInBlock(location, out result);

            int i = 0;

            foreach (Character c in result)
            {
                transform.Find("Slot" + c.Id.ToString()).SetSiblingIndex(i++);
            }

            for (int j = i; j < transform.childCount; j++)
            {
                transform.GetChild(j).gameObject.SetActive(false);
            }

            UpdateRectSize(result.Count);
        }