示例#1
0
    // Fonctions-------------------------------------------
    void Start()
    {
        interacteur = Camera.main.GetComponent<ObjInteraction>();
        othersMenu = new ArrayList();
        foreach(Component cp in this.GetComponents<MonoBehaviour>())
        {
            if(cp.GetType() != this.GetType() && cp.GetType().GetInterface("GUIInterface")!= null)
            {
                othersMenu.Add(cp);
            }
        }

        menuGroup  = new Rect(off7,(Screen.height/2)-350/2,260,350);
        menuSubGroup = new Rect(0,0,0,0);

        //Interaction
        configuredObj = null;
    }
示例#2
0
    //-----------------------------------------------------
    void Start()
    {
        originals = GameObject.Find("Originals");
        mainNode = GameObject.Find("MainNode");

        _interacteur = Camera.main.GetComponent<ObjInteraction>();

        menuGroup = new Rect();
        SetRects();

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

        //Ajout au Root
        Root = new GUIItemV2(-1,-1,"Root","","",this);
        //Title = new GUIItemV2(-1,-1,"Objets","title","title",this);
    }
    // Use this for initialization
    void Start()
    {
        if(_uiSkin == null)
            _uiSkin = (GUISkin)Resources.Load("skins/DynShelterSkin");

        UI = new DynShelterUI(this);

        menuConf = GameObject.Find("MainScene").GetComponent<GUIMenuConfiguration>();
        menuInteract = GameObject.Find("MainScene").GetComponent<GUIMenuInteraction>();
        interact = Camera.main.GetComponent<ObjInteraction>();

        _dsMdl = new DynShelterModel(this);

        _nextInsertion = true;

        StartCoroutine(LoadConf());

        _upperArea = new Rect(Screen.width/2 - 300,225,600,120);
        _leftArea = new Rect(0.0f, 0.0f, Screen.width * 2.0f, Screen.height);

        InstantiateRessources();

        UsefullEvents.mode2DStateUpdated += QuitOverride;
        UsefullEvents.OnResizeWindowEnd += UIRelocate;

        CenterDeployAndFeetLimit();
    }
示例#4
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>();
    }