示例#1
0
    ///////////////////////////////////////////////////////////
    // demo screen to explain preset loading and saving features
    ///////////////////////////////////////////////////////////
    private void DemoPreset()
    {
        if (m_Demo.FirstFrame)
        {
            m_Demo.FirstFrame    = false;
            m_Demo.DrawCrosshair = false;
            m_Demo.FreezePlayer(m_OverviewPos, m_OverviewAngle, true);
            m_Player.SetWeapon(0);
        }

        m_Demo.DrawBoxes("presets & states", "Perhaps our most powerful feature is the COMPONENT PRESET SYSTEM, which allows you to save component snapshots in text files. The new advanced STATE MANAGER then blends between your presets at runtime. This allows for very complex preset combinations with smooth, natural transitions (and little or no need for scripting).", null, ImageRightArrow);
        m_Demo.DrawImage(ImagePresetDialogs);

        m_Demo.ForceCameraShake();
    }
示例#2
0
    /// <summary>
    /// demo screen to explain preset loading and saving features
    /// </summary>
    private void DemoPresets()
    {
        if (m_Demo.FirstFrame)
        {
            m_GoAgainTimer.Cancel();
            m_Demo.FirstFrame    = false;
            m_Demo.DrawCrosshair = false;
            m_Demo.FreezePlayer(m_OverViewPos, m_OverViewAngle, true);
            m_Demo.WeaponHandler.CancelTimers();
            m_Demo.WeaponHandler.SetWeapon(0);
            m_Demo.Input.MouseCursorZones[0] = new Rect((Screen.width * 0.5f) - 370, 40, 80, 80);
            m_Demo.Input.MouseCursorZones[1] = new Rect((Screen.width * 0.5f) + 290, 40, 80, 80);
            m_Demo.Input.ForceCursor         = true;
        }

        m_Demo.DrawBoxes("states & presets", "You may easily design custom movement STATES (like running, crouching or proning).\nWhen happy with your tweaks, save them to PRESET FILES, and the STATE MANAGER\nwill blend smoothly between them at runtime.", ImageLeftArrow, ImageRightArrow, delegate() { m_Demo.LoadLevel(0); });
        m_Demo.DrawImage(ImagePresetDialogs);

        m_Demo.ForceCameraShake();
    }
示例#3
0
    /// <summary>
    /// demo screen to show a final summary message and editor screenshot
    /// </summary>
    private void DemoOutro()
    {
        if (m_Demo.FirstFrame)
        {
            m_Demo.FirstFrame    = false;
            m_Demo.DrawCrosshair = false;
            m_Demo.FreezePlayer(m_OutroPos, m_OutroAngle, true);
            m_Demo.Input.ForceCursor = true;
            m_OutroStartTime         = Time.time;
        }

        // pan camera slowly for the clouds to move a little in the outro screen
        m_FPSCamera.Angle = new Vector2(
            m_OutroAngle.x,
            m_OutroAngle.y + (Mathf.Cos(((Time.time - m_OutroStartTime) + 50) * 0.03f) * 20)
            );

        m_Demo.DrawBoxes("putting it all together", "Included in the package is full, well commented C# source code, an in-depth 70-page MANUAL in PDF format, a game-ready FPS PLAYER prefab along with all the scripts and content used in this demo. A FANTASTIC starting point (or upgrade) for any FPS project.\nBest part? It can be yours in a minute. GET IT NOW on visionpunk.com!", ImageLeftArrow, ImageCheckmark, delegate() { m_Demo.LoadLevel(0); });
        m_Demo.DrawImage(ImageAllParams);
    }