/// </summary>
    ///
    /// </summary>
    public vp_FPSDemoManager(GameObject player)
    {
        Player = player;

        Controller = Player.GetComponent<vp_FPController>();
        Camera = Player.GetComponentInChildren<vp_FPCamera>();
        WeaponHandler = Player.GetComponentInChildren<vp_FPWeaponHandler>();
        PlayerEventHandler = (vp_FPPlayerEventHandler)Player.GetComponentInChildren(typeof(vp_FPPlayerEventHandler));
        Input = Player.GetComponent<vp_FPInput>();
        Earthquake = (vp_Earthquake)Component.FindObjectOfType(typeof(vp_Earthquake));

        // on small screen resolutions the editor preview screenshot
        // panel is minimized by default, otherwise expanded
        if (Screen.width < 1024)
            EditorPreviewSectionExpanded = false;
    }
Beispiel #2
0
    /// </summary>
    ///
    /// </summary>
    public vp_FPSDemoManager(GameObject player)
    {
        Player = player;

        Controller         = Player.GetComponent <vp_FPController>();
        Camera             = Player.GetComponentInChildren <vp_FPCamera>();
        WeaponHandler      = Player.GetComponentInChildren <vp_FPWeaponHandler>();
        PlayerEventHandler = (vp_FPPlayerEventHandler)Player.GetComponentInChildren(typeof(vp_FPPlayerEventHandler));
        Input      = Player.GetComponent <vp_FPInput>();
        Earthquake = (vp_Earthquake)Component.FindObjectOfType(typeof(vp_Earthquake));

        // on small screen resolutions the editor preview screenshot
        // panel is minimized by default, otherwise expanded
        if (Screen.width < 1024)
        {
            EditorPreviewSectionExpanded = false;
        }
    }