Example #1
0
 private void Model_Notify(object sender, NotifyArg e)
 {
     if (this.Notify != null)
     {
         this.Notify(sender, e);
     }
 }
Example #2
0
 public void LoadCommonAB(NotifyArg args)
 {
     string[] commonAB = { "UI/Prefab/Common" };
     if (loadMode == ResourceLoadMode.AssetBundle)
     {
         abLoader.StageLoadAB(commonAB);
     }
 }
Example #3
0
        public void TriggerNotify(string notify, NotifyArg arg = null)
        {
            Notify item = ObjectPoolManager.Instance.Get <Notify>();

            item.NotifyString = notify;
            item.arg          = arg;
            triggerQueue.Enqueue(item);
        }
Example #4
0
 private void Syncfrm_Notify(object sender, NotifyArg e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new Action(() =>
         {
             this.SendNotify(e.Message);
         }));
     }
     else
     {
         this.SendNotify(e.Message);
     }
 }
Example #5
0
    private void OnPlayAudio(NotifyArg arg)
    {
        AudioNotifyArg audioArg = (arg as AudioNotifyArg);

        if (currentBgm != null && currentBgm.IsSame(audioArg))
        {
            return;
        }

        AudioClip   audioClip   = ResourceManager.Instance.LoadAudioClip(audioArg.AudioPath);
        AudioSource audioSource = audioArg.IsBgm ? FrameworkRoot.bgmAudioSource : FrameworkRoot.soundAudioSource;

        audioSource.clip   = audioClip;
        audioSource.volume = audioArg.IsBgm ? bgmVolume : soundVolume;
        audioSource.loop   = audioArg.IsBgm;
        currentBgm         = audioArg.IsBgm ? audioArg : currentBgm;
        audioSource.Play();
    }
Example #6
0
 private void ChangeScene(NotifyArg args)
 {
     LeaveAllStage();
     SceneManager.LoadSceneAsync((args as SceneNotifyArg).SceneName);
 }
Example #7
0
 private void FrameworkStartUp(NotifyArg args)
 {
     LoadStage <HomeStage>();
     //ChangeScene(new SceneNotifyArg("Main"));
 }
Example #8
0
 public void Dispose()
 {
     NotifyString = "";
     arg          = null;
     callback     = null;
 }
Example #9
0
 public void TriggerNotify(string notify, NotifyArg arg = null)
 {
     NotifyManager.Instance.TriggerNotify(notify, arg);
 }
Example #10
0
 private void CheckResource(NotifyArg args)
 {
 }