Beispiel #1
0
 private GameBordUIAndMenusManager()
 {
     topPanelManager            = TopPanelManager.Instance;
     citizensGroupPanelsManager = CitizensGroupPanelsManager.Instance;
     SetupArrows();
     bottomPanelManeger = BottomPanelManeger.instance;
 }
Beispiel #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     //DontDestroyOnLoad(gameObject);
 }
Beispiel #3
0
    void Awake()
    {
        if (alPrScr == null)
        {
            alPrScr = FindObjectOfType <AllPrefsScript>();
        }
        if (univFunc == null)
        {
            univFunc = FindObjectOfType <UniversalFunctions>();
        }
        if (gM == null)
        {
            gM = FindObjectOfType <GameManager> ();
        }
        if (adMob == null)
        {
            adMob = FindObjectOfType <AndroidAdMob_0>();
        }
        if (buf == null)
        {
            buf = FindObjectOfType <Buffer>();
        }

        if (cntrL == null)
        {
            cntrL = FindObjectOfType <CountriesList>();
        }
        if (plL == null)
        {
            plL = FindObjectOfType <PlayersList>();
        }
        if (prMng == null)
        {
            prMng = FindObjectOfType <ProfileManager>();
        }

        switch (SceneManager.GetActiveScene().buildIndex)
        {
        case 1:
            if (upgr == null)
            {
                upgr = FindObjectOfType <Upgrades>();
            }
            if (allAw == null)
            {
                allAw = FindObjectOfType <AllAwardsScript>();
            }
            if (topPanMng == null)
            {
                topPanMng = FindObjectOfType <TopPanelManager>();
            }
            if (objM == null)
            {
                objM = FindObjectOfType <Objects_Menu>();
            }
            if (currPrPan == null)
            {
                currPrPan = FindObjectOfType <CurrentProfilePanel>();
            }
            if (everyDayReward == null)
            {
                everyDayReward = FindObjectOfType <EverydayReward>();
            }
            if (carMng == null)
            {
                carMng = FindObjectOfType <CareerManager>();
            }
            break;

        case 2:
            if (fwScr == null)
            {
                fwScr = FindObjectOfType <FireworkScript>();
            }
            if (molnia == null)
            {
                molnia = FindObjectOfType <LighteningScript>();
            }
            if (practScr == null)
            {
                practScr = FindObjectOfType <Practice>();
            }
            if (timFr == null)
            {
                timFr = FindObjectOfType <TimeFreeze>();
            }
            if (rainMan == null)
            {
                rainMan = FindObjectOfType <RainManager>();
            }
            if (bonObjMan == null)
            {
                bonObjMan = FindObjectOfType <BonusObjManager>();
            }
            if (enOrDis == null)
            {
                enOrDis = FindObjectOfType <EnableOrDisable>();
            }
            if (monWin == null)
            {
                monWin = FindObjectOfType <MoneyWinScript>();
            }
            if (camSize == null)
            {
                camSize = FindObjectOfType <CameraSize>();
            }
            if (colCorr == null)
            {
                colCorr = FindObjectOfType <ColorCorrectionControl>();
            }
            if (marks == null)
            {
                marks = FindObjectOfType <Markers>();
            }
            if (goalPanScr == null)
            {
                goalPanScr = FindObjectOfType <GoalPanelScript>();
            }
            if (objLev == null)
            {
                objLev = FindObjectOfType <Objects_Level>();
            }
            if (scoreScr == null)
            {
                scoreScr = FindObjectOfType <Score>();
            }
            if (pMov == null)
            {
                pMov = FindObjectOfType <PlayerMovement>();
            }
            if (tM == null)
            {
                tM = FindObjectOfType <TimeManager>();
            }
            if (ballScr == null)
            {
                ballScr = FindObjectOfType <BallScript>();
            }
            if (grTr == null)
            {
                grTr = FindObjectOfType <GroundTrigger1>();
            }
            if (congrPan == null)
            {
                congrPan = FindObjectOfType <CongradulationsPanel>();
            }
            if (levAudScr == null)
            {
                levAudScr = FindObjectOfType <LevelAudioScript>();
            }
            if (stChScr == null)
            {
                stChScr = FindObjectOfType <StadiumChooseScript>();
            }
            if (ballTScr == null)
            {
                ballTScr = FindObjectOfType <BallTouchScript>();
            }
            if (jScr == null)
            {
                jScr = FindObjectOfType <JumpScript>();
            }
            if (skyScr == null)
            {
                skyScr = FindObjectOfType <SkyScript>();
            }
            //if (enAlg == null) enAlg = FindObjectOfType<Enemy>();
            break;
        }
    }
Beispiel #4
0
 void Start()
 {
     TopPanelManager tm = GameObject.Find("Menu Manager").GetComponent <TopPanelManager>();
 }