protected override void OnDlgInit()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eChest, true);

        LabName.text       = mgr.cShareData.strUserName;
        LabLv.text         = "6";
        LabDancingCnt.text = "8";
        LabCombo.text      = "36";
        LabMaxScores.text  = "18000";
        LabHasSongs.text   = "9";

        SetAttribute(CharAttr.ePhysical, 30);
        SetAttribute(CharAttr.eEndurance, 60);
        SetAttribute(CharAttr.eCharm, 50);
        SetAttribute(CharAttr.eTechnique, 80);

        cMoneyNumber.Init(ref SprMoneyNumber, eNumberType.eSilver);
        cExpNumber.Init(ref SprExpNumber);

        //test
        cMoneyNumber.ShowNumber(ref SprMoneyNumber, 12345);
        cExpNumber.ShowNumber(ref SprExpNumber, 67890);
    }
Exemplo n.º 2
0
    protected override void OnDlgInit()
    {
        for (int i = 0; i < SprPrepare.Length; i++)
        {
            SprPrepare[i].enabled = false;
            SprLight[i].enabled   = false;
        }

        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        LabCharName[0].text = mgr.cShareData.strUserName;

        for (int i = 0; i < 2; i++)
        {
            LabCharName[i + 1].enabled = false;
        }

        for (int i = 0; i < mgr.cShareData.cCurRoomData.litPeopleName.Count; i++)
        {
            if (i + 1 < LabCharName.Length)
            {
                if (!string.IsNullOrEmpty(mgr.cShareData.cCurRoomData.litPeopleName[i]))
                {
                    LabCharName[i + 1].enabled = true;
                    LabCharName[i + 1].text    = mgr.cShareData.cCurRoomData.litPeopleName[i];
                }
            }
        }

        BtnStart.gameObject.SetActiveRecursively(false);

        DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eWaitingRoomMain, true);

        if (mgr.cShareData.cCurRoomData.litPeopleSex.Count >= 1)
        {
            DcGlobalFunc.CreateChar(mgr.cShareData.cCurRoomData.litPeopleSex[0] == 0 ? CharSex.eMan : CharSex.eWoman,
                                    mgr.cShareData.cCurRoomData.litPeopleSex[0] == 0 ? CharModel.eOne : CharModel.eTwo,
                                    CharForWhat.eWaitingRoomLeft, true, false);

            StartCoroutine(ImitateOthersPrepare((int)UnityEngine.Random.Range(1, 5), 1));
            nCurPeopleNum++;
        }
        if (mgr.cShareData.cCurRoomData.litPeopleSex.Count >= 2)
        {
            DcGlobalFunc.CreateChar(mgr.cShareData.cCurRoomData.litPeopleSex[1] == 0 ? CharSex.eMan : CharSex.eWoman,
                                    mgr.cShareData.cCurRoomData.litPeopleSex[1] == 0 ? CharModel.eOne : CharModel.eTwo,
                                    CharForWhat.eWaitingRoomRight, true, false);

            StartCoroutine(ImitateOthersPrepare((int)UnityEngine.Random.Range(1, 5), 2));
            nCurPeopleNum++;
        }
    }
Exemplo n.º 3
0
    protected override void OnDlgInit()
    {
        BoxOK.size          = new Vector3(0, 0, 0);
        SprOKBtn.spriteName = "GrayButton";
        SprOKText.color     = new Color(0.66f, 0.66f, 0.66f);

        cTempChar[0] = GameObject.Find("GameObj_Man");
        cTempChar[1] = GameObject.Find("GameObj_Woman");

        cManObj = DcGlobalFunc.CreateChar(CharSex.eMan, CharModel.eOne, CharForWhat.eCreateCharacter, true);
        cManObj.transform.parent        = cTempChar[0].transform;
        cManObj.transform.localPosition = new Vector3(0f, 0f, 0f);
        cManObj.transform.Rotate(new Vector3(0, 180f, 0));

        cWomanObj = DcGlobalFunc.CreateChar(CharSex.eWoman, CharModel.eOne, CharForWhat.eCreateCharacter, true);
        cWomanObj.transform.parent        = cTempChar[1].transform;
        cWomanObj.transform.localPosition = new Vector3(0f, 0f, 0f);
    }
Exemplo n.º 4
0
    protected override void OnDlgInit()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        for (int i = 0; i < cItems.Length; i++)
        {
            cItems[i].SetActiveRecursively(false);
        }
        for (int i = 0; i < 5 /*mgr.cShareData.lstFriendsData.Count*/; i++)
        {
            cItems[i].SetActiveRecursively(true);

            for (int j = 0; j < cItems[i].transform.childCount; j++)
            {
                GameObject child = cItems[i].transform.GetChild(j).gameObject;
                if (child.name == "sprItemBg_0")
                {
                    SprItemBg[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                else if (child.name == "sprItemBg_1")
                {
                    SprItemBg[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                else if (child.name == "sprItemIcon_0")
                {
                    SprItemIcon[i * 2]            = child.GetComponent(typeof(UISprite)) as UISprite;
                    SprItemIcon[i * 2].spriteName = "Head portrait girl 01";
                }
                else if (child.name == "sprItemIcon_1")
                {
                    SprItemIcon[i * 2 + 1]            = child.GetComponent(typeof(UISprite)) as UISprite;
                    SprItemIcon[i * 2 + 1].spriteName = "Head portrait girl 03";
                }
            }
        }

        TempInitClothesAndPantsIcon(0);
        TempInitClothesAndPantsIcon(5);

        DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eChest, true);
    }
Exemplo n.º 5
0
    void Start()
    {
        SceneManager mgr      = Singlton.getInstance("SceneManager") as SceneManager;
        GameObject   cCharObj = DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eDancingMain, false);

        cMainChar = cCharObj.GetComponent(typeof(DcCharAnim)) as DcCharAnim;

        if (mgr.cShareData.nDancingEntranceType == 2)
        {
            if (mgr.cShareData.cCurRoomData.litPeopleSex.Count >= 1)
            {
                cCharObj = DcGlobalFunc.CreateChar(mgr.cShareData.cCurRoomData.litPeopleSex[0] == 0 ? CharSex.eMan : CharSex.eWoman,
                                                   mgr.cShareData.cCurRoomData.litPeopleSex[0] == 0 ? CharModel.eOne : CharModel.eTwo,
                                                   CharForWhat.eDancingLeft, false, false);
            }
        }
        else
        {
            cCharObj = DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex == CharSex.eMan ? CharSex.eWoman : CharSex.eMan,
                                               CharModel.eOne, CharForWhat.eDancingLeft, false, false);
        }
        cCostar[0] = cCharObj.GetComponent(typeof(DcCharAnim)) as DcCharAnim;

        if (mgr.cShareData.nDancingEntranceType == 2)
        {
            if (mgr.cShareData.cCurRoomData.litPeopleSex.Count >= 2)
            {
                cCharObj = DcGlobalFunc.CreateChar(mgr.cShareData.cCurRoomData.litPeopleSex[1] == 0 ? CharSex.eMan : CharSex.eWoman,
                                                   mgr.cShareData.cCurRoomData.litPeopleSex[1] == 0 ? CharModel.eOne : CharModel.eTwo,
                                                   CharForWhat.eDancingRight, false, false);
            }
        }
        else
        {
            cCharObj = DcGlobalFunc.CreateChar(CharSex.eWoman, CharModel.eTwo, CharForWhat.eDancingRight, false, false);
        }
        cCostar[1] = cCharObj.GetComponent(typeof(DcCharAnim)) as DcCharAnim;

        posCurMainCharPos = cMainChar.transform.localPosition;
    }
    protected override void OnDlgInit()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eInterior, true);
    }
Exemplo n.º 7
0
    protected override void OnDlgInit()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eChest, true);

        cMoneyNumber.Init(ref SprMoneyNumber, eNumberType.eSilver);
        cExpNumber.Init(ref SprExpNumber);

        //test
        cMoneyNumber.ShowNumber(ref SprMoneyNumber, 12345);
        cExpNumber.ShowNumber(ref SprExpNumber, 67890);

        for (int i = 0; i < cGoods.Length; i++)
        {
            cGoods[i].SetActiveRecursively(false);
        }
        for (int i = 0; i < 8 /*mgr.cShareData.lstFriendsData.Count*/; i++)
        {
            cGoods[i].SetActiveRecursively(true);

            for (int j = 0; j < cGoods[i].transform.childCount; j++)
            {
                GameObject child = cGoods[i].transform.GetChild(j).gameObject;
                if (child.name == "sprItemBg_0")
                {
                    SprGoods[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                else if (child.name == "sprItemBg_1")
                {
                    SprGoods[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                if (child.name == "btnBuy_0")
                {
                    SprGoodsBuyBtn[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                else if (child.name == "btnBuy_1")
                {
                    SprGoodsBuyBtn[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                if (child.name == "sprBuy_0")
                {
                    SprGoodsBuyText[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                else if (child.name == "sprBuy_1")
                {
                    SprGoodsBuyText[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite;
                }

                if (child.name == "sprItemIcon_0")
                {
                    SprGoodsIcon[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                else if (child.name == "sprItemIcon_1")
                {
                    SprGoodsIcon[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite;
                }
                if (child.name == "labItemPrice_0")
                {
                    LabGoodsPrice[i * 2]      = child.GetComponent(typeof(UILabel)) as UILabel;
                    LabGoodsPrice[i * 2].text = (i * 2).ToString();
                }
                else if (child.name == "labItemPrice_1")
                {
                    LabGoodsPrice[i * 2 + 1]      = child.GetComponent(typeof(UILabel)) as UILabel;
                    LabGoodsPrice[i * 2 + 1].text = (i * 2 + 1).ToString();
                }
            }
        }
    }