Esempio n. 1
0
        public void Draw(Rectangle real)
        {
            foreach (var illustration in Illustrations)
            {
                Primitives.DrawImage(Assets.TextureFromCard(illustration), real);
                if (Treasure.Instance.ShowFireMode)
                {
                    Writer.DrawNumberInRectangle(Heat.DescribeSelf(), real.Extend(-4, -4));
                }
                else
                {
                    if (Heat.Burning)
                    {
                        Illustration fireIllus = Illustration.Fire16;
                        float        diff      = Heat.MaximumIntensity - Heat.FireStartAt;
                        if (Heat.HeatCount >= Heat.FireStartAt + diff / 4)
                        {
                            fireIllus = Illustration.Fire20;
                        }

                        if (Heat.HeatCount >= Heat.FireStartAt + diff * 2 / 4)
                        {
                            fireIllus = Illustration.Fire24;
                        }

                        if (Heat.HeatCount >= Heat.FireStartAt + diff * 3 / 4)
                        {
                            fireIllus = Illustration.Fire32;
                        }

                        Primitives.DrawImage(Assets.TextureFromCard(fireIllus), real);
                    }
                    else if (Heat.HeatCount >= 0.5f)
                    {
                        Primitives.DrawImage(Assets.TextureFromCard(Illustration.Fire16), real);
                    }
                }
            }
        }