Exemplo n.º 1
0
 void UpdateSFX()
 {
     if (direction != Vector2.zero)
     {
         if (FxManager.instance.GetComponent <AudioSource>().isPlaying == false)
         {
             FxManager.PlayMusic("WalkFx");
         }
     }
     else
     {
         FxManager.StopMusic("WalkFx");
     }
 }
Exemplo n.º 2
0
 public void SetIcon(Sprite s)
 {
     icon.sprite = s;
     if (s == null)
     {
         iconBoxAnim.SetBool("Enable", false);
         FxManager.StopMusic("PickUpFx");
     }
     else if (s != null)
     {
         iconBoxAnim.SetBool("Enable", true);
         if (!recorded && playerIconBox)
         {
             FxManager.PlayMusic("PickUpFx");
             recorded = true;
         }
     }
 }