Beispiel #1
0
    void Start()
    {
        instance = this;

        // cache references to our player and level manager objects
        player       = GameObject.FindObjectOfType <PlayerControl>();
        levelManager = GameObject.FindObjectOfType <LevelManager>();

        // cache some references to various menu screens and so on
        menuSystem  = GameObject.FindObjectOfType <MenuSystem>();
        mainMenu    = menuSystem.GetScreen("MainMenu");
        pauseMenu   = menuSystem.GetScreen("PauseMenu");
        restartMenu = menuSystem.GetScreen("RestartMenu");
        storeMenu   = menuSystem.GetScreen("StoreMenu");
        screenFade  = GameObject.Find("ScreenFade").GetComponent <CanvasGroup>();
        infoPopup   = GameObject.FindObjectOfType <InfoPopup>();

        // find our full screen effects
        motionBlur = GameObject.FindObjectOfType <CameraMotionBlur>();
        screenBlur = GameObject.FindObjectOfType <BlurOptimized>();

        // start with the screen fader opaque
        screenFade.alpha = 1.0f;

        creditMultiplier = 1.0f;

        CheckShopItemIDs();
        InitFullscreenEffects();

        OnEnterStateMenus();
    }