Beispiel #1
0
        public PyriteCaveCounter()
        {
            lazyGenerators = new Queue <CountDownValue>();

            void OnCarriedRight()
            {
                lazyGenerators.Enqueue(CountDownValue.CreateValue(10));
            }

            void OnCarriedLeft()
            {
                lazyGenerators.Enqueue(CountDownValue.CreateValue(20));
                lazyGenerators.Enqueue(CountDownValue.CreateValue(30));
            }

            mainCounters = new MainCounter[6]
            {
                new MainCounter(OnCarriedLeft),
                new MainCounter(OnCarriedRight),
                new MainCounter(OnCarriedLeft),
                new MainCounter(OnCarriedRight),
                new MainCounter(OnCarriedLeft),
                new MainCounter(OnCarriedRight),
            };
        }
        public VibravaCounter(ref uint seed)
        {
            lazyGenerators = new Queue <CountDownValue>();

            void OnCarried()
            {
                lazyGenerators.Enqueue(CountDownValue.CreateValue(1));
                lazyGenerators.Enqueue(CountDownValue.CreateValue(31));
                lazyGenerators.Enqueue(CountDownValue.CreateValue(31));
                lazyGenerators.Enqueue(CountDownValue.CreateValue(31));
                lazyGenerators.Enqueue(CountDownValue.CreateValue(101));
            }

            root = new MapObjectCounter(ref seed, OnCarried);
            for (int i = 1; i < 8; i++)
            {
                root.InterruptChild(new MapObjectCounter(ref seed, OnCarried));
            }
        }