Пример #1
0
        protected override void RefreshChild()
        {
            int pos = 0;

            foreach (Menu_Base i in ITEM)
            {
                if (i.GetType() == typeof(IGMDataItem.Gradient.Renzokeken))
                {
                    IGMDataItem.Gradient.Renzokeken rg = (IGMDataItem.Gradient.Renzokeken)i;
                    if (pos++ < _hits)
                    {
                        rg.Show();
                    }
                    else
                    {
                        rg.Hide();
                    }
                }
            }
            base.RefreshChild();
        }
Пример #2
0
        public override bool Update()
        {
            if (!Enabled)
            {
                return(false);
            }
            bool done = false;
            bool hot  = false;

            ((IGMDataItem.Icon)ITEM[Count - 5, 0]).Data     = Icons.ID._0_Hit_ + _count;
            ((IGMDataItem.Texture)ITEM[Count - 4, 0]).Color = HitSlider.Update();

            int hotcnt = 0;
            int pos    = 0;

            foreach (Menu_Base i in ITEM)
            {
                if (i?.GetType() == typeof(IGMDataItem.Gradient.Renzokeken) && pos++ < _hits)
                {
                    IGMDataItem.Gradient.Renzokeken gr = (IGMDataItem.Gradient.Renzokeken)i;
                    done = !gr.Done || done;
                    hot  = gr.Trigger || hot;
                    if (gr.Done)
                    {
                        hotcnt++;
                    }
                }
            }
            if (!done)
            {
                if ((delayMS += Memory.ElapsedGameTime) > TimeSpan.FromMilliseconds(1000))
                {
                    //Damageable.EndTurn(); //gets stuck if the current player isn't squall
                    Menu.BattleMenus.GetCurrentBattleMenu().Damageable.EndTurn();
                }
            }
            if (hot)
            {
                ((IGMDataItem.Icon)ITEM[Count - 3, 0]).Palette = 6;
                ((IGMDataItem.Icon)ITEM[Count - 2, 0]).Palette = 6;
                ((IGMDataItem.Texture)ITEM[0, 0]).Color        = Renzokenken_Seperator_Color;
                ITEM[Count - 1, 0].Show();
                ITEM[Count - 5, 0].Hide();
                ITEM[Count - 6, 0].Hide();
            }
            else
            {
                ((IGMDataItem.Icon)ITEM[Count - 3, 0]).Palette = 2;
                ((IGMDataItem.Icon)ITEM[Count - 2, 0]).Palette = 2;
                ((IGMDataItem.Texture)ITEM[0, 0]).Color        = Renzokenken_Seperator_Color_Faded;
                if ((hotcnt >= _hits) || !done)// && ITEM[Count - 1, 0].Enabled)
                {
                    if (_count >= _hits)
                    {
                        ITEM[Count - 6, 0].Show();
                    }
                    else if (_count > 0)
                    {
                        ITEM[Count - 5, 0].Show();
                    }
                }
                //else if (hotcnt > 0) Debug.WriteLine(hotcnt);

                ITEM[Count - 1, 0].Hide();
            }
            base.Update();
            return(true);
        }