public override void ready()
    {
        base.ready();
        roomPage.switchTeamButton.onClick.AddListener(OnSwitchTeam);
        roomPage.startGameButton.onClick.AddListener(OnStartGame);


        redTeamScrollView  = UITool.AddUIComponent <TeamRedScrollView>(roomPage.redTeamRT.gameObject);
        blueTeamScrollView = UITool.AddUIComponent <TeamBlueScrollView>(roomPage.blueTeamRT.gameObject);
        roomPage.exitButton.onClick.AddListener(OnExitRoom);


        redTeams  = redTeamScrollView.skinPools.ToArray();
        blueTeams = blueTeamScrollView.skinPools.ToArray();

        refreshRoomList();

        bool isReady = (bool)PhotonNetwork.LocalPlayer.CustomProperties["isReady"];

        //costomProperties = new ExitGames.Client.Photon.Hashtable() { { "isReady", !isReady } };
        //PhotonNetwork.LocalPlayer.SetCustomProperties(costomProperties);
        if (!PhotonNetwork.IsMasterClient)
        {
            if (isReady)
            {
                roomPage.startGameText.text = "准备";
            }
            else
            {
                roomPage.startGameText.text = "取消准备";
            }
        }
    }
Beispiel #2
0
 //private void SaveOffer()
 //{
 //    string json = UnityEngine.JsonUtility.ToJson(schemeManifest);
 //    //cacheScheme.AddSchemeCache("",json);
 //}
 /// <summary>
 /// 方案主页    里面包含  效果图和清单
 /// </summary>
 private void mainScheme()
 {
     mainPage.schemeName.text = schemeManifest.name;
     schemeImagesScroll       = scheme.ImageScrollView.gameObject.AddComponent <SchemeEffectImageScroll>();
     schemeImagesScroll.addEventListener(SchemeEvent.openEffectImage, OpenEffectImage);
     schemeManifestScroll = scheme.OfferScrollView.gameObject.AddComponent <SchemeManifestScroll>();
     schemeManifestScroll.addEventListener(SchemeEvent.AddOffer, AddOffer);
     schemeManifestScroll.addEventListener(SchemeEvent.openOffer, OpenOffer);
     createOfferScroll  = scheme.createScrollView.gameObject.AddComponent <CreateOfferScroll>();
     offerModerScroll   = scheme.offerModelScrollView.gameObject.AddComponent <OfferModerScroll>();
     setMainOfferScroll = UITool.AddUIComponent <SetMainOfferScroll>(scheme.setMainScrollView.gameObject);
     editorOfferScroll  = UITool.AddUIComponent <GeneraterOfferScroll>(scheme.generaterScrollView.gameObject);
     //scheme.OfferScrollView.gameObject.SetActive(false);
     fullScreenScroll = UITool.AddUIComponent <FullScreenScroll>(scheme.effectScroll.gameObject);
     scheme.exitBut.onClick.AddListener(onExit);
     scheme.effectBut.onClick.AddListener(onOpenEffect);
     scheme.detailBut.onClick.AddListener(onOpenDetail);
     scheme.nameText.text = schemeManifest.name;
     scheme.desText.text  = schemeManifest.description;
     scheme.nameText.onValueChanged.AddListener(onIputSchemeName);
     scheme.desText.onValueChanged.AddListener(onIputSchemeDes);
     //schemeManifest.name = scheme.namePlaceholder.text;
     //schemeManifest.description = scheme.desPlaceholder.text;
     this.addEventListener(SchemeEvent.ChangeScheme, ChangeScheme);
     fullScreenScroll.addEventListener(IOSEvent.ShareImage, ShareImage);
     fullScreenScroll.addEventListener(MainPageUIDataEvent.SchemeEffectImageDeleted, SchemeEffectImageDeleted);
 }
Beispiel #3
0
 protected override void Ready(Object arg1)
 {
     base.Ready(arg1);
     RectController       = skin.GetComponent <RectTransform>();
     RectCameraViewScroll = UITool.GetUIComponent <RectTransform>(skin.transform, "CameraViewScroll");
     cameraViewScroll     = UITool.AddUIComponent <CameraViewScroll>(RectCameraViewScroll.gameObject);
     RectCameraViewScroll.anchoredPosition = Vector3.zero;
     cameraViewAdd = UITool.GetUIComponent <Button>(skin.transform, "CameraViewAdd");
     //cameraViewAdd = UITool.GetUIComponent<Button>(skin.transform, "CameraViewAdd");
 }
Beispiel #4
0
    public override void ready()
    {
        base.ready();
        lobbyPage.exitLobbyButton.onClick.AddListener(OnExitLobby);
        lobbyPage.createButton.onClick.AddListener(OnCreateRoom);
        lobbyPage.randomEnterRoomButton.onClick.AddListener(OnRandomEnterRoom);
        lobbyRoomScrollView = UITool.AddUIComponent <LobbyRoomScrollView>(lobbyPage.RoomListScrollRect.gameObject);
        lobbyRoomScrollView.enterRoomAction = OnEnterRoom;

        //TypedLobby typedLobby = new TypedLobby { Name = "FPS", Type = LobbyType.Default };
        //typedLobby
        PhotonNetwork.JoinLobby();

        //
    }
 protected override void Ready(Object arg1)
 {
     base.Ready(arg1);
     RectController = skin.GetComponent <RectTransform>();
     materialScroll = UITool.AddUIComponent <MaterialImageScroll>(skin);
 }
Beispiel #6
0
    protected override void Ready(Object arg1)
    {
        Logo = null;
        RawImage image = UITool.GetUIComponent <RawImage>(skin.transform, "ChildNode/Scheme/CreateOffer/Content/OfferProduce/ScrollView/itemPictures/RawImage");

        if (image != null)
        {
            Logo = image.texture;
        }

        //image = skin.transform.FindChild("RawImage").GetComponent<RawImage>();
        //image.gameObject.SetActive(false);
        #region Top
        top       = skin.transform.FindChild("Top");
        TopLeft   = skin.transform.FindChild("TopLeft");
        topRight  = skin.transform.FindChild("TopRight");
        menuGroup = UITool.GetUIComponent <GridLayoutGroup>(top, "Menu");
        Transform tLeft = UITool.GetUIComponent <Transform>(top, "Menu/Left");
        open = UITool.AddUIComponent <ClickButton>(tLeft, "open");
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            UITool.SetActionFalse(open.gameObject);
        }
        save = UITool.AddUIComponent <ClickButton>(tLeft, "save");
        redo = UITool.AddUIComponent <ClickButton>(tLeft, "redo");
        undo = UITool.AddUIComponent <ClickButton>(tLeft, "undo");
        Transform tCenter = UITool.GetUIComponent <Transform>(top, "Menu/Center");
        template    = UITool.AddUIComponent <ToggleButton>(tCenter, "template");
        innerLine   = UITool.AddUIComponent <ToggleButton>(tCenter, "innerLine");
        middleLine  = UITool.AddUIComponent <ToggleButton>(tCenter, "middleLine");
        measurement = UITool.AddUIComponent <ToggleButton>(tCenter, "measurement");
        show        = UITool.AddUIComponent <ToggleButton>(tCenter, "show");
        Transform tRight = UITool.GetUIComponent <Transform>(top, "Menu/Right");
        render     = UITool.AddUIComponent <ClickButton>(tRight, "render");
        offer      = UITool.AddUIComponent <ClickButton>(tRight, "offer");
        share      = UITool.AddUIComponent <ClickButton>(tRight, "share");
        cameraView = UITool.AddUIComponent <ToggleButton>(tRight, "CameraView");
        cameraView.gameObject.SetActive(true);
        cameraView.gameObject.SetActive(false);
        Transform topLeft = skin.transform.FindChild("TopLeft");
        exit        = UITool.GetUIComponent <Button>(topLeft, "exit");
        SaveBox     = UITool.GetUIComponent <RectTransform>(topLeft, "exit/IsSave");
        cancelSave  = UITool.GetUIComponent <Button>(SaveBox, "cancel");
        confirmSave = UITool.GetUIComponent <Button>(SaveBox, "confirm");
        exitSave    = UITool.GetUIComponent <Button>(SaveBox, "exitSave");
        material    = UITool.GetUIComponent <Button>(topLeft, "Material");
        scheme      = UITool.AddUIComponent <ClickButton>(topLeft, "scheme");
        schemeName  = UITool.GetUIComponent <Text>(topLeft, "scheme/name");
        Vector2 v2 = schemeName.rectTransform.anchoredPosition;
        v2.x = 0;
        schemeName.rectTransform.anchoredPosition = v2;
        thereD = UITool.GetUIComponent <Button>(topRight, "thereD");
        twoD   = UITool.GetUIComponent <Button>(topRight, "twoD");
        //two_D_No_Menu.Add(open);
        two_D_No_Menu.Add(template);
        two_D_No_Menu.Add(innerLine);
        two_D_No_Menu.Add(middleLine);
        two_D_No_Menu.Add(measurement);
        #endregion

        #region Bottom
        // 渲染 部分还没有  写 。。。
        bottomRight = skin.transform.FindChild("BottomRight");
        setup       = UITool.GetUIComponent <Button>(bottomRight, "set_up");
        query       = UITool.GetUIComponent <Button>(bottomRight, "query");

        #endregion

        #region Center
        centerRight = skin.transform.FindChild("CenterRight");
        addButton   = UITool.GetUIComponent <Button>(centerRight, "addButton");
        #endregion

        #region ChildNode
        ChildNode = UITool.GetUIComponent <RectTransform>(skin.transform, "ChildNode");

        SkinScheme = ChildNode.FindChild("Scheme").gameObject;
        //Scheme.Instance.SetData(skin);

        SkinTemplate = ChildNode.FindChild("Template").gameObject;
        //TemplatePage.Instance.SetData(skin);

        SkinRender = ChildNode.FindChild("Render").gameObject; //UITool.GetUIComponent<RectTransform>(ChildNode, "Render");
        //RenderPage.Instance.SetData(skin);

        SkinShow = ChildNode.FindChild("Show").gameObject; // UITool.GetUIComponent<RectTransform>(ChildNode, "Show");
        //ShowOrHide.Instance.SetData(skin);

        SkinSelelctOptions = skin.transform.FindChild("BottomCenter").gameObject;

        SkinMaterialScorll = ChildNode.FindChild("MaterialScroll").gameObject; // UITool.GetUIComponent<RectTransform>(ChildNode, "MaterialScroll");
        //MaterialPage.Instance.SetData(skin);

        SkinCameraViewScroll = ChildNode.FindChild("CameraView").gameObject;

        SkinParticular = ChildNode.FindChild("Particulars").gameObject;

        saveScheme = ChildNode.FindChild("SaveScheme").gameObject;

        SkinSetWall = ChildNode.FindChild("SetWall").gameObject; //UITool.GetUIComponent<RectTransform>(ChildNode, "SetWall");
        //SetWallPage.Instance.SetData(skin);

        SkinSetting = ChildNode.FindChild("Setting").gameObject; //UITool.GetUIComponent<RectTransform>(ChildNode, "Setting");
        //SettingPage.Instance.SetData(skin);

        SkinKeyBoard = ChildNode.FindChild("KeyBoard").gameObject; //UITool.GetUIComponent<RectTransform>(ChildNode,"KeyBoard");
        //KeyBoard.Instance.SetData(skin);

        SkinGroup = ChildNode.FindChild("GroupCollect").gameObject; // UITool.GetUIComponent<RectTransform>(ChildNode,"Group");
        //GroupPage.Instance.SetData(skin);
        #endregion
        loadSceneProgress = skin.transform.FindChild("LoadSceneProgress") as RectTransform;
        loadingScene      = UITool.GetUIComponent <RectTransform>(loadSceneProgress, "LoadingScene");
        loadExit          = UITool.GetUIComponent <Button>(loadSceneProgress, "LoadExit");
        loadProgressImage = UITool.GetUIComponent <Image>(loadingScene, "progress");
        loadProgressText  = UITool.GetUIComponent <Text>(loadingScene, "progressText");
        LoadSucceed       = skin.transform.FindChild("LoadSceneProgress/LoadSucceed") as RectTransform;
        UITool.SetActionFalse(loadSceneProgress.gameObject);
        UITool.SetActionFalse(loadingScene.gameObject);
        UITool.SetActionFalse(LoadSucceed.gameObject);

        ChildTransfrom.Add(top);
        ChildTransfrom.Add(topLeft);
        ChildTransfrom.Add(topRight);
        ChildTransfrom.Add(SkinSelelctOptions.transform);
        ChildTransfrom.Add(bottomRight);
        ChildTransfrom.Add(centerRight);
        ChildTransfrom.Add(ChildNode);
    }
    protected override void Ready(Object arg1)
    {
        base.Ready(arg1);

        RectSetRoom = UITool.GetUIComponent <RectTransform>(skin.transform, "BottomMenu/RectSetRoom");
        setRoomType = UITool.GetUIComponent <Dropdown>(RectSetRoom, "setroomDropdown");
        deletRoom   = UITool.GetUIComponent <Button>(RectSetRoom, "delete");
        Transform bottomItem = UITool.GetUIComponent <Transform>(skin.transform, "BottomMenu/BottomItem");

        particulars       = UITool.AddUIComponent <ToggleButton>(bottomItem, "particulars");
        copy              = UITool.GetUIComponent <Button>(bottomItem, "copy");
        l_r_mirroring     = UITool.GetUIComponent <Button>(bottomItem, "leftRightMirror");
        u_d_mirroring     = UITool.GetUIComponent <Button>(bottomItem, "upDownMirror");
        replace           = UITool.GetUIComponent <Button>(bottomItem, "replace");
        disWall           = UITool.AddUIComponent <ToggleButton>(bottomItem, "disWall");
        distanceWall      = UITool.GetUIComponent <RectTransform>(bottomItem, "disWallValue");
        inputUnit         = UITool.GetUIComponent <Button>(distanceWall, "Button");
        inputValue        = UITool.GetUIComponent <Text>(inputUnit.transform, "Text");
        cancel            = UITool.GetUIComponent <Button>(distanceWall, "Cancel");
        ok                = UITool.GetUIComponent <Button>(distanceWall, "Ok");
        disFloor          = UITool.AddUIComponent <ToggleButton>(bottomItem, "disFloor");
        RectDisFloorValue = UITool.GetUIComponent <RectTransform>(bottomItem, "disFloorValue");
        defaultFloorDis   = UITool.GetUIComponent <Button>(RectDisFloorValue, "Default");
        FloorSlider       = UITool.GetUIComponent <Slider>(RectDisFloorValue, "Slider");
        FloorTitle        = UITool.GetUIComponent <Text>(RectDisFloorValue, "Slider/HandleSlideArea/Handle/title");
        inputFloorValue   = UITool.GetUIComponent <Button>(RectDisFloorValue, "Value");
        disFloorValue     = UITool.GetUIComponent <Text>(RectDisFloorValue, "Value/value");
        disFloorUnit      = UITool.GetUIComponent <Text>(RectDisFloorValue, "Value/unit");
        rotation          = UITool.AddUIComponent <ToggleButton>(bottomItem, "rotation");
        RectRotation      = UITool.GetUIComponent <RectTransform>(bottomItem, "rotationValue");
        rotationDefault   = UITool.GetUIComponent <Button>(RectRotation, "Default");
        rotationAngle     = UITool.GetUIComponent <Button>(RectRotation, "rotation/rotation");
        rotationSlider    = UITool.GetUIComponent <Slider>(RectRotation, "Slider");
        sliderValue       = UITool.GetUIComponent <Text>(RectRotation, "Slider/HandleSlideArea/Handle/title");
        inputRotation     = UITool.GetUIComponent <Button>(RectRotation, "Value");
        rotationValue     = UITool.GetUIComponent <Text>(RectRotation, "Value/value");
        group             = UITool.AddUIComponent <ToggleButton>(bottomItem, "group");
        m_delete          = UITool.GetUIComponent <Button>(bottomItem, "delete");
        collect           = UITool.GetUIComponent <Button>(bottomItem, "collect");
        m_show            = UITool.GetUIComponent <Button>(bottomItem, "show");

        Transform optionMenu = UITool.GetUIComponent <Transform>(skin.transform, "BottomMenu");

        backGroundThereD   = UITool.GetUIComponent <Button>(optionMenu, "3DBackGround");
        RectSelectWallSide = UITool.GetUIComponent <RectTransform>(optionMenu, "3DSelectWall");
        selectWall         = RectSelectWallSide.GetComponent <Button>();
        wall2           = UITool.GetUIComponent <Button>(RectSelectWallSide, "Wall2");
        RectWall2       = wall2.GetComponent <RectTransform>();
        wall2optionList = UITool.GetUIComponent <RectTransform>(RectWall2, "opertation");

        option1 = UITool.GetUIComponent <Button>(wall2optionList, "option1");

        option2         = UITool.GetUIComponent <Button>(wall2optionList, "option2");
        option3         = UITool.GetUIComponent <Button>(wall2optionList, "option3");
        option4         = UITool.GetUIComponent <Button>(wall2optionList, "option4");
        option5         = UITool.GetUIComponent <Button>(wall2optionList, "option5");
        option6         = UITool.GetUIComponent <Button>(wall2optionList, "option6");
        setValue        = UITool.GetUIComponent <Button>(wall2optionList, "SetValue");
        wallValue       = UITool.GetUIComponent <Text>(wall2optionList, "SetValue/value");
        wall4           = UITool.GetUIComponent <Button>(RectSelectWallSide, "Wall4");
        RectWall4       = wall4.GetComponent <RectTransform>();
        wall4optionList = UITool.GetUIComponent <RectTransform>(RectWall4, "opertation");
        optionOne       = UITool.GetUIComponent <Button>(wall4optionList, "optionOne");
        optionTwo       = UITool.GetUIComponent <Button>(wall4optionList, "optionTwo");
        optionThere     = UITool.GetUIComponent <Button>(wall4optionList, "optionThere");
        optionFour      = UITool.GetUIComponent <Button>(wall4optionList, "optionFour");
        optionFive      = UITool.GetUIComponent <Button>(wall4optionList, "optionFive");
        optionSix       = UITool.GetUIComponent <Button>(wall4optionList, "optionSix");
        optionSeven     = UITool.GetUIComponent <Button>(wall4optionList, "optionSeven");
        setValue1       = UITool.GetUIComponent <Button>(wall4optionList, "SetValue");
        wallValue1      = UITool.GetUIComponent <Text>(setValue1.transform, "value");
        setValue2       = UITool.GetUIComponent <Button>(wall4optionList, "SetValue1");
        wallValue2      = UITool.GetUIComponent <Text>(setValue2.transform, "value");
        auto            = UITool.GetUIComponent <Button>(wall4optionList, "Auto");
        wall5           = UITool.GetUIComponent <Button>(RectSelectWallSide, "wall5");


        operationList.Add(RectSetRoom.transform);
        operationList.Add(particulars.transform);
        operationList.Add(copy.transform);
        operationList.Add(l_r_mirroring.transform);
        operationList.Add(u_d_mirroring.transform);
        operationList.Add(replace.transform);
        operationList.Add(disWall.transform);
        operationList.Add(disFloor.transform);
        operationList.Add(group.transform);
        operationList.Add(m_delete.transform);
        operationList.Add(collect.transform);
        operationList.Add(m_show.transform);
        operationList.Add(backGroundThereD.transform);
        operationList.Add(RectSelectWallSide);
        operationList.Add(rotation.transform);
    }