Advertisement
Guest User

example event

a guest
Jun 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public event Action<string> onPlayerNameUpdate = (name) => {Debug.Log("player name was changed! "+ mPlayerName)}
  2.  
  3. public event Action<string> WhenPlayerNameUpdate
  4. {
  5. add
  6. {
  7. if(!string.isNullOrEmpty(m_playerName)
  8. value(m_playerName);
  9. onPlayerNameUpdate += value;
  10. }
  11. remove
  12. {
  13. onPlayerNameUpdate -= value;
  14.  
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement