Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #30 from umm-projects/fix/#29-clean_instance_on_de…
Browse files Browse the repository at this point in the history
…stroy

Clean instance OnDestroy
  • Loading branch information
monry authored Jul 5, 2018
2 parents e537979 + 954a2f9 commit 45f6d6f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Assets/Scripts/Domain/Component/MusicPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ private void Awake()
AudioSource.playOnAwake = false;
}

private void OnDestroy()
{
HasInstalled = false;
}

public void Inject(IMusicModel musicModel)
{
MusicModel = musicModel;
Expand Down Expand Up @@ -79,4 +84,4 @@ public void SetPitch(float pitch)
}

}
}
}

0 comments on commit 45f6d6f

Please sign in to comment.