Example #1
0
        public int DoTotalUnitCount(float player, bool only_selected)
        {
            CountAllUnits.Apply(CurrentData, CurrentUnits, player, only_selected, Output: Multigrid[0]);

            color count = MultigridReduce(CountReduce_3byte1byte.Apply);

            return((int)(SimShader.unpack_val(count.xyz) + .5f));
        }
Example #2
0
        public Tuple <int, int> DoUnitCount(float player, bool only_selected)
        {
            CountUnits.Apply(CurrentData, CurrentUnits, player, only_selected, Output: Multigrid[0]);

            color count = MultigridReduce(CountReduce_3byte1byte.Apply);

            int unit_count     = (int)(SimShader.unpack_val(count.xyz) + .5f);
            int barracks_count = Int(count.w);

            return(new Tuple <int, int>(unit_count, barracks_count));
        }