void UpdateSFX() { if (direction != Vector2.zero) { if (FxManager.instance.GetComponent <AudioSource>().isPlaying == false) { FxManager.PlayMusic("WalkFx"); } } else { FxManager.StopMusic("WalkFx"); } }
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; } } }