Beispiel #1
0
    private void LoadResource()
    {
        if (m_imgLoading == null)
        {
            string     ObjectPath = string.Format("{0}/Model/Loading/Loading", ResourceLoad.CheckHeight);
            GameObject tmpObject  = ResourceLoad.GetGameObject("Loading", ObjectPath);

            m_imgLoading = new ControlMesh();
            m_imgLoading.Create(tmpObject);
            m_imgLoading.transform.parent = Main.inst.GetResourceObject_EZGUITEXTURE().transform;
        }
        else if (m_imgLoading.gameObject == null)
        {
            string     ObjectPath = string.Format("{0}/Model/Loading/Loading", ResourceLoad.CheckHeight);
            GameObject tmpObject  = ResourceLoad.GetGameObject("Loading", ObjectPath);

            m_imgLoading.Create(tmpObject);
            m_imgLoading.transform.parent = Main.inst.GetResourceObject_EZGUITEXTURE().transform;
        }
        SetResources();
    }
Beispiel #2
0
    private void SetEffectUV()
    {
        if (m_listEffectUV != null)
        {
            return;
        }

        m_listEffectUV = new Dictionary <int, List <Rect> >((int)SEASON_TYPE._MAX);

        string ObjectPath;

        ObjectPath = string.Format("{0}/Mobile/EZGUI/Game/Kitty/Effect/Background", ResourceLoad.CheckHeight);
        GameObject tmpBackground = ResourceLoad.GetGameObject("Background", ObjectPath);

        DefineBaseManager.inst.SetKittyGap(tmpBackground.GetComponent <UIButton>().ImageSize.x);

        Rect tmpBackgroundUV = (Rect)tmpBackground.GetComponent <UIButton>().GetUVs();

        ObjectPath = string.Format("{0}/Mobile/EZGUI/Game/Kitty/Effect/TurnBack", ResourceLoad.CheckHeight);
        GameObject tmpTurnBack    = ResourceLoad.GetGameObject("TurnBack", ObjectPath);
        Rect       tmpTurnBackUV0 = (Rect)tmpTurnBack.GetComponent <UIButton>().GetUVs();

        tmpTurnBack.GetComponent <UIButton>().SetState((int)UIButton.CONTROL_STATE.OVER);
        Rect tmpTurnBackUV1 = (Rect)tmpTurnBack.GetComponent <UIButton>().GetUVs();

        tmpTurnBack.GetComponent <UIButton>().SetState((int)UIButton.CONTROL_STATE.ACTIVE);
        Rect tmpTurnBackUV2 = (Rect)tmpTurnBack.GetComponent <UIButton>().GetUVs();

        tmpTurnBack.GetComponent <UIButton>().SetState((int)UIButton.CONTROL_STATE.DISABLED);
        Rect tmpTurnBackUV3 = (Rect)tmpTurnBack.GetComponent <UIButton>().GetUVs();

        ObjectPath = string.Format("{0}/Mobile/EZGUI/Game/Kitty/Effect/Effect", ResourceLoad.CheckHeight);
        GameObject tmpEffect = ResourceLoad.GetGameObject("Effect", ObjectPath);

        m_fEffectSize = tmpEffect.GetComponent <UIButton>().ImageSize.x;

        Rect tmpEffectUV0 = (Rect)tmpEffect.GetComponent <UIButton>().GetUVs();

        tmpEffect.GetComponent <UIButton>().SetState((int)UIButton.CONTROL_STATE.OVER);
        Rect tmpEffectUV1 = (Rect)tmpEffect.GetComponent <UIButton>().GetUVs();

        tmpEffect.GetComponent <UIButton>().SetState((int)UIButton.CONTROL_STATE.ACTIVE);
        Rect tmpEffectUV2 = (Rect)tmpEffect.GetComponent <UIButton>().GetUVs();

        tmpEffect.GetComponent <UIButton>().SetState((int)UIButton.CONTROL_STATE.DISABLED);
        Rect tmpEffectUV3 = (Rect)tmpEffect.GetComponent <UIButton>().GetUVs();

        int seasontype = 0;

        SetSeasonUVs(seasontype, tmpBackgroundUV);
        SetSeasonUVs(seasontype, tmpTurnBackUV0);
        SetSeasonUVs(seasontype, tmpEffectUV0);
        seasontype++;
        SetSeasonUVs(seasontype, tmpBackgroundUV);
        SetSeasonUVs(seasontype, tmpTurnBackUV1);
        SetSeasonUVs(seasontype, tmpEffectUV1);
        seasontype++;
        SetSeasonUVs(seasontype, tmpBackgroundUV);
        SetSeasonUVs(seasontype, tmpTurnBackUV2);
        SetSeasonUVs(seasontype, tmpEffectUV2);
        seasontype++;
        SetSeasonUVs(seasontype, tmpBackgroundUV);
        SetSeasonUVs(seasontype, tmpTurnBackUV3);
        SetSeasonUVs(seasontype, tmpEffectUV3);

        DestroyImmediate(tmpBackground);
        DestroyImmediate(tmpTurnBack);
        DestroyImmediate(tmpEffect);
    }