Last active
April 5, 2020 19:14
-
-
Save smkplus/b49b67e7a379e14e6634968df115d13a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEngine; | |
| public class Subject : MonoBehaviour | |
| { | |
| //delegate that stores the list of methods | |
| public static Action onNotify; | |
| private void Start() | |
| { | |
| //Invokes the notificaton method | |
| if (onNotify != null) | |
| { | |
| onNotify.Invoke(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment