Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyUp(KeyCode.X))
        {
            GameEntry.Resource.UpdatePrefixUri = Application.dataPath + "/../assetbundle/Windows";
            Debug.Log(GameEntry.Resource.UpdatePrefixUri);

            GameEntry.Resource.InitResources(OnInitResourcesCompleteCallback);
        }

        if (Input.GetKeyUp(KeyCode.A))
        {
            GameEntry.Resource.UpdatePrefixUri = Application.dataPath + "/../assetbundle/Windows";
            Debug.Log(GameEntry.Resource.UpdatePrefixUri);

            GameEntry.Resource.UpdateVersionList(152190, -2095824658, 34739, -1588960418, new UpdateVersionListCallbacks((downloadPath, dodownloadurl) =>
            {
                Debug.Log(downloadPath);
                Debug.Log(dodownloadurl);
                GameEntry.Resource.CheckResources(OnCheckResourcesCompleteCallback);
            },
                                                                                                                         (downloadUri, errorMessage) =>
            {
                Debug.Log(downloadUri);
                Debug.Log(errorMessage);
            }));
        }


        if (Input.GetKeyUp(KeyCode.B))
        {
            sound1 =
                GameEntry.Sound.PlaySound("Assets/DownLoad/Sound/BgMusic/bgm_byd.mp3", "Music", 0, new PlaySoundParams()
            {
                Priority           = 0,
                Loop               = false,
                VolumeInSoundGroup = 1,
            });
            sound2 =
                GameEntry.Sound.PlaySound("bgm_createrole", "Music", 0, new PlaySoundParams()
            {
                Priority = 1,
                Loop     = true,
            });
        }
        if (Input.GetKeyUp(KeyCode.C))
        {
            GameEntry.Sound.PauseSound(sound1);
            //sound2 =
            //GameEntry.Sound.PlaySound("bgm_createrole", "Sound/BgMusic/bgm_createrole", "Music", 0, new PlaySoundParams()
            //{
            //    Priority = 1,
            //    Loop = true,
            //});
            //GameEntry.Sound.PlaySound("bgm_digong", "Sound/BgMusic/bgm_digong", "Music", 0, new PlaySoundParams()
            //{
            //    Priority = 2,
            //    Loop = true,
            //});
        }

        if (Input.GetKeyUp(KeyCode.D))
        {
            GameEntry.Sound.ResumeSound(sound1, 5f);
        }

        if (Input.GetKeyUp(KeyCode.E))
        {
            GameEntry.Entity.ShowEntity <ABCEntity>(1, "104000", "ABC", "258");
        }

        if (Input.GetKeyUp(KeyCode.F))
        {
            ABCEntity aBCEntity = (ABCEntity)GameEntry.Entity.GetEntity(1);
            GameEntry.Sound.PlaySound("bgm_digong", "Sound", 0, new PlaySoundParams()
            {
                Priority = 2,
                Loop     = true,
            }, aBCEntity);
        }
    }
Beispiel #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ABCEntity entity = (ABCEntity)value;

            return(Brushes.Green);
        }