예제 #1
0
    public string GetAssetsName(int AssetsID, AssetLoader.EAssetType Type)
    {
        string AssetsName = "";

        if (Type == AssetLoader.EAssetType.ASSET_EFFECT)
        {
            EffectAssetsData AssetsData = EffectAssetsData.GetData(AssetsID);
            if (null == AssetsData)
            {
                return("");
            }
            AssetsName = AssetsData.assetsName_;
        }
        else if (Type == AssetLoader.EAssetType.ASSET_PLAYER ||
                 Type == AssetLoader.EAssetType.ASSET_WEAPON)
        {
            EntityAssetsData AssetsData = EntityAssetsData.GetData(AssetsID);
            if (null == AssetsData)
            {
                return("");
            }
            AssetsName = AssetsData.assetsName_;
        }
        else if (Type == AssetLoader.EAssetType.ASSET_UI)
        {
            UIAssetsData AssetsData = UIAssetsData.GetData(AssetsID);
            if (null == AssetsData)
            {
                return("");
            }
            AssetsName = AssetsData.assetsName_;
        }
        else if (Type == AssetLoader.EAssetType.ASSET_SOUND)
        {
            SoundAssetsData AssetsData = SoundAssetsData.GetData(AssetsID);
            if (null == AssetsData)
            {
                return("");
            }
            AssetsName = AssetsData.assetsName_;
        }
        else if (Type == AssetLoader.EAssetType.ASSET_MUSIC)
        {
            MusicAssetsData AssetsData = MusicAssetsData.GetData(AssetsID);
            if (null == AssetsData)
            {
                return("");
            }
            AssetsName = AssetsData.assetsName_;
        }

        return(AssetsName);
    }
예제 #2
0
    public static void ExcuteLoadedEvent()
    {
        Transform trans = null;

        if (ApplicationEntry.Instance != null)
        {
            for (int i = 0; i < ApplicationEntry.Instance.uiRoot.transform.childCount; ++i)
            {
                trans = ApplicationEntry.Instance.uiRoot.transform.GetChild(i);
                if (trans.gameObject.name.Equals("NameLabel"))
                {
                    GameObject.Destroy(trans.gameObject);
                }
            }
        }

        Loading = false;

        if (OnSceneLoaded != null)
        {
            OnSceneLoaded(Scene_name);
        }

        SceneData sd = SceneData.GetData(GameManager.SceneID);

        if (sd == null)
        {
            return;
        }
        MusicAssetsData mdata = MusicAssetsData.GetData(sd.M_ID);

        if (!GlobalValue.isBattleScene(Scene_name))
        {
            SoundTools.PlayMusic((MUSIC_ID)mdata.id_);
        }

        if (!BagSystem.instance.IsInit && !Scene_name.Equals("LoginScene") && !Scene_name.Equals("CreateRoleScene"))
        {
            NetConnection.Instance.requestBag();
        }
    }
예제 #3
0
    static public void OpenMusic()
    {
        PlayerPrefs.SetInt("settingMusic", 0);
        settingDirty = true;
        int mucId = 0;

        if (GamePlayer.Instance.isInBattle)
        {
            if (Battle.Instance.battleType == BattleType.BT_PVE)
            {
                if (Battle.Instance.BattleID == 0)
                {
                    GlobalValue.Get(Constant.C_BossMuc, out mucId);
                    PlayMusic((MUSIC_ID)mucId);
                }
                else
                {
                    GlobalValue.Get(Constant.C_PutnMuc, out mucId);
                    PlayMusic((MUSIC_ID)mucId);
                }
            }
            else
            if (Battle.Instance.battleType == BattleType.BT_PVP)
            {
                GlobalValue.Get(Constant.C_PvpMuc, out mucId);
                PlayMusic((MUSIC_ID)mucId);
            }
        }
        else
        {
            SceneData sd = SceneData.GetData(GameManager.SceneID);
            if (sd == null)
            {
                return;
            }
            MusicAssetsData mdata = MusicAssetsData.GetData(sd.M_ID);
            PlayMusic((MUSIC_ID)mdata.id_);
        }
    }