Example #1
0
        public override void Update(GameTime gameTime)
        {
            //Animate the panels if necessary
            base.Update(gameTime);

            if (ShowCust)
            {
                Lolxy  = (int)MathHelper.Clamp(Lolxy + 2, 71, 87);
                StgPos = new Point(0, Lolxy);
            }
            else
            {
                Lolxy  = (int)MathHelper.Clamp(Lolxy - 2, 71, 87);
                StgPos = new Point(0, Lolxy);
            }


            for (var i = 0; i < 3; i++)     // For each row
            {
                for (var j = 0; j < 6; j++) // For each col
                {
                    //Get the linear index of the col/row pair
                    var u = GetIndex(i, j);
                    //Designate colors accrd. to DefaultPnlColr
                    var x = _defaultPnlColr[u];
                    //Designate specific pos with offset of the StgPos
                    var y = new Point(PnlColPnt[j] + StgPos.X, PnlRowPnt[i] + StgPos.Y);
                    PanelArray[u].StgPnlPos = y;
                }
            }

            _stageRed.AdvanceAllGroups();
            _stageBlue.AdvanceAllGroups();
        }