Beispiel #1
0
        private GridNormalizeEventArgs StepResult()
        {
            int[] el = new int[5];
            foreach (Hexagon h in SelectedHex)
            {
                if (h.Content.Element != HexagonElement.None)
                {
                    el[(int)h.Content.Element]++;
                }
            }
            var e = new GridNormalizeEventArgs();

            e.ElementsAmount = el;
            return(e);
        }
Beispiel #2
0
        private void CheckProgress(object sender, GridNormalizeEventArgs e)
        {
            bool complete = true;

            foreach (LevelCondition c in conditions)
            {
                c.Progress += e[c.Info.Element];
                if (!c.Complete)
                {
                    complete = false;
                }
            }
            if (complete)
            {
                CompleteLevel();
            }
            Steps -= 1;
        }