예제 #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 show a welcoming message
    /// </summary>
    private void DemoIntro()
    {
        // draw the three big boxes at the top of the screen;
        // the next & prev arrows, and the main text box
        m_Demo.DrawBoxes("part ii: under the hood", "Ultimate FPS features a NEXT-GEN first person camera system with ultra smooth PROCEDURAL ANIMATION of player movements. Camera and weapons are manipulated using over 100 parameters, allowing for a vast range of super-lifelike behaviors.", null, m_ImageRightArrow);

        // this bracket is only run the first frame of a new demo screen
        // being rendered. it is used to make some initial settings
        // specific to the current demo screen.
        if (m_Demo.FirstFrame)
        {
            m_Demo.DrawCrosshair = false;
            m_Demo.FirstFrame    = false;
            m_Demo.Camera.RenderingFieldOfView = 20;
            m_Demo.Camera.SnapZoom();
            m_Demo.WeaponHandler.SetWeapon(0);
            m_Demo.FreezePlayer(m_OverviewPos, m_OverviewAngle, true);                                  // prevent player from moving
            m_Demo.LastInputTime -= 20;                                                                 // makes the big arrow start fading 20 seconds earlier on this screen
            m_Demo.RefreshDefaultState();
            m_Demo.Input.MouseCursorForced = true;
        }

        m_Demo.Input.MouseCursorForced = true;
        m_Demo.ForceCameraShake();
    }
예제 #3
0
    /// <summary>
    /// demo screen to list some included example scripts
    /// </summary>
    private void DemoIntro()
    {
        if (m_Demo.FirstFrame)
        {
            m_Demo.FirstFrame    = false;
            m_Demo.DrawCrosshair = false;
            m_Demo.FreezePlayer(m_OverviewPos, m_OverviewAngle, true);
            m_Demo.Input.ForceCursor = true;
        }

        m_Demo.DrawBoxes("welcome", "Featuring the SMOOTHEST CONTROLS and the most POWERFUL FPS CAMERA\navailable for Unity, Ultimate FPS is an awesome script pack for achieving that special\n 'AAA FPS' feeling. This demo will walk you through some of its core features ...\n", null, ImageRightArrow, null, null);
        m_Demo.ForceCameraShake();
    }
예제 #4
0
    /// <summary>
    /// demo screen to list some included example scripts
    /// </summary>
    private void DemoIntro()
    {
        if (m_Demo.FirstFrame)
        {
            m_Demo.FirstFrame    = false;
            m_Demo.DrawCrosshair = false;
            m_Demo.FreezePlayer(m_OverviewPos, m_OverviewAngle, true);
            m_Demo.Input.MouseCursorForced = true;

            m_BodyAnimator = (vp_BodyAnimator)Component.FindObjectOfType(typeof(vp_BodyAnimator));
            if (m_BodyAnimator != null)
            {
                m_BodyAnimator.gameObject.SetActive(false);
            }
        }

        m_Demo.DrawBoxes("welcome", "Featuring the SMOOTHEST CONTROLS and the most POWERFUL FPS CAMERA\navailable for Unity, UFPS is an awesome script pack for achieving that special\n 'AAA FPS' feeling. This demo will walk you through some of its core features ...\n", null, ImageRightArrow, null, null);
        m_Demo.ForceCameraShake();
    }
예제 #5
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();
    }