Exemple #1
0
        void DrawAbout()
        {
            DrawUtil.FillTexture(_displayTexture, new Color(0, 0, 0));
            DrawUtil.DrawSpriteOpaque(aboutTexture, _displayTexture, 0, 0, 64, 64, 0, 0);

            DrawParade();
            _displayTexture.Apply();
        }
Exemple #2
0
        void DrawMainMenu()
        {
            DrawUtil.FillTexture(_displayTexture, new Color(0, 0, 0));
            DrawUtil.DrawSpriteAlpha(menuTexture, _displayTexture, 0, 0, 64, 64, 0, 0);

            int soundOff = 0;

            if (SoundMgr.Singleton.IsOn)
            {
                soundOff = 2;
            }
            else
            {
                soundOff = 1;
            }
            DrawUtil.DrawSpriteAlpha(widgetsTexture, _displayTexture, 0, 7 * soundOff, 30, 7, 34, 14);

            int dispOff = 0;

            switch (DiffMgr.Singleton.Difficulty)
            {
            case Difficulty.Easy:
                dispOff = 3;
                break;

            case Difficulty.Normal:
                dispOff = 2;
                break;

            case Difficulty.Hard:
                dispOff = 1;
                break;

            case Difficulty.Extreme:
                dispOff = 0;
                break;
            }
            DrawUtil.DrawSpriteAlpha(diffTexture, _displayTexture, 0, 7 * dispOff, 25, 7, 28, 21);

            DrawMenuCursor();
            _displayTexture.Apply();
        }
Exemple #3
0
 void DrawTitle()
 {
     DrawUtil.FillTexture(_displayTexture, new Color(0, 0, 0));
     DrawUtil.DrawSpriteOpaque(titleTexture, _displayTexture, 0, 0, 64, 64, 4, 24);
     _displayTexture.Apply();
 }
Exemple #4
0
        void DrawBigMaze()
        {
            DrawUtil.FillTexture(_displayTexture, new Color(0.25f, 0.25f, 0.75f));

            Color wallColor = new Color(0.5f, 0.5f, 1.0f);
            Color openColor = new Color(0, 0, 0);

            var window = 13;

            for (int dx = -window; dx <= window; ++dx)
            {
                int mx = bigMapX + dx;
                for (int dy = -window; dy <= window; ++dy)
                {
                    int my = bigMapY + dy;

                    var px = 32 + 2 * dx;
                    var py = 32 - 2 * dy;

                    DrawUtil.SetPixel(_displayTexture, px, py, openColor);

                    if (BigMapManager.BigMapMgrSingleton.GetHasCleared(mx, my))
                    {
                        DrawUtil.SetPixel(_displayTexture, px, py, new Color(0, 1, 0));
                    }

                    if ((dx == 0) && (dy == 0))
                    {
                        DrawUtil.SetPixel(_displayTexture, px, py, new Color(1, 1, 0));
                    }

                    DrawUtil.SetPixel(_displayTexture, px - 1, py - 1, wallColor);
                    DrawUtil.SetPixel(_displayTexture, px - 1, py + 1, wallColor);
                    DrawUtil.SetPixel(_displayTexture, px + 1, py - 1, wallColor);
                    DrawUtil.SetPixel(_displayTexture, px + 1, py + 1, wallColor);

                    Color passageColor;
                    Color dbgColor;

                    if (BigMapManager.BigMapMgrSingleton.CanMove(mx, my, MovementDirection.NORTH, out dbgColor))
                    {
                        passageColor = openColor;
                    }
                    else
                    {
                        passageColor = wallColor;
                    }
                    DrawUtil.SetPixel(_displayTexture, px, py + 1, passageColor);

                    if (BigMapManager.BigMapMgrSingleton.CanMove(mx, my, MovementDirection.EAST, out dbgColor))
                    {
                        passageColor = openColor;
                    }
                    else
                    {
                        passageColor = wallColor;
                    }
                    DrawUtil.SetPixel(_displayTexture, px + 1, py, passageColor);

                    if (BigMapManager.BigMapMgrSingleton.CanMove(mx, my, MovementDirection.SOUTH, out dbgColor))
                    {
                        passageColor = openColor;
                    }
                    else
                    {
                        passageColor = wallColor;
                    }
                    DrawUtil.SetPixel(_displayTexture, px, py - 1, passageColor);

                    if (BigMapManager.BigMapMgrSingleton.CanMove(mx, my, MovementDirection.WEST, out dbgColor))
                    {
                        passageColor = openColor;
                    }
                    else
                    {
                        passageColor = wallColor;
                    }
                    DrawUtil.SetPixel(_displayTexture, px - 1, py, passageColor);
                }
            }
        }