Beispiel #1
0
    void Awake()
    {
        _montage = GameObject.Find("MainScene").GetComponent<Montage>();
        _guistart = GameObject.Find("MainScene").GetComponent<GUIStart>();
        _cb = GetComponent<GUIDialogBox>();
        _plugPhoto = GameObject.Find("MainScene").GetComponent<PluginPhotoManagerGUI>();

        #if UNITY_ANDROID
        //s'il y à un fichier autosave.cub enregistré, affichage boîte de dialogue proposant de charger cette scène
        if (PlayerPrefs.GetInt("autosave") == 1)
        {
            Debug.Log(" autosave à 1");
            string path = usefullData.SavePath + "autosave" + usefullData.SaveNewFileExtention;
            if (File.Exists(path))
            {
                _guistart.enabled = false;
                _askAutosave = true;
                _cb.showMe(true, GUI.depth);
                _cb.setBtns(TextManager.GetText("GUIMenuRight.Yes"),
                      TextManager.GetText("GUIMenuRight.No"));
                _cb.setText(TextManager.GetText("GUIMenuRight.AskAutoSave1") + "\n" + TextManager.GetText("GUIMenuRight.AskAutoSave2"));

            }
            PlayerPrefs.SetInt("autosave", 0);
        }
        #endif
    }
Beispiel #2
0
    //-----------------------------------------------------
    void Awake()
    {
        #if UNITY_ANDROID && !UNITY_EDITOR
        //AndroidCommons.Init();
        #endif
        ReferenceRotation = GameObject.Find ("SpecLight").transform.rotation;
        ModulesAuthorization.moduleAuth += AuthorizePlugin;
        usefullData.logoUpdated += LogoUpdate;
        StartCoroutine(CheckNewVersion());

        UsefullEvents.OnResizingWindow  += SetRects;
        UsefullEvents.OnResizeWindowEnd += SetRects;

        _pluginPhotoRef = GetComponent<PluginPhotoManagerGUI>();
    }
Beispiel #3
0
    //-----------------------------------------------------
    void Start()
    {
        m_objInter=GameObject.Find("mainCam").GetComponent<ObjInteraction>();
        if (grassNode==null) Debug.LogError(DEBUGTAG+"grassNode"+PC.MISSING_REF);
        if (gommeNode==null) Debug.LogError(DEBUGTAG+"gommeNode"+PC.MISSING_REF);
        if (m_mode2D == null) Debug.LogError(DEBUGTAG+"Mode2D"+PC.MISSING_REF);

        m_off7 = Screen.width;

        m_slideTouchEnded = false;
        //		touchOldPos = new Queue<Vector2>();
        //		touchCount = 0;

        othersMenu = new ArrayList();
        foreach(Component cp in this.GetComponents<MonoBehaviour>())
        {
            if(cp.GetType() != this.GetType() && cp.GetType().GetInterface("GUIInterface")!= null)
            {
                othersMenu.Add(cp);
            }
        }

        //shortcuts
        _camPivot = GameObject.Find("camPivot");
        if(_camPivot!=null)
            sc = _camPivot.GetComponent<SceneControl>();

        GameObject lightPivot = GameObject.Find("LightPivot");
        if(lightPivot!=null)
        {
            lc = lightPivot.GetComponent<LightConfiguration>();
        }

        _lightEffects = GameObject.Find("lightEffects");
        if(_lightEffects!=null)
        {
            _lightEffectsParentNode = _lightEffects.transform.parent;
        }
        interacteur = Camera.main.GetComponent<ObjInteraction>();
        _grid = GameObject.Find("grid");
        _mainNode = GameObject.Find("MainNode");
        _childrenNodes = new ArrayList();

        //		//CREATION DE LA GUI
        //		CreateGui();

        //Before/After
        c_camCull = Camera.main.cullingMask;
        //		s2hRect = new Rect(Screen.width/2-256,-200,512,200);

        //ConfirmationBox
        _cb = GetComponent<GUIDialogBox>();

        initLanguages();

        if(GameObject.Find("_avatar"))
        {
            _avatarControl = GameObject.Find("_avatar").GetComponent<Avatar>();
            avatarTransform =  GameObject.Find("_avatar").transform;
        }
        _pluginPhotoRef = GetComponent<PluginPhotoManagerGUI>();
    }