Last active
December 13, 2015 21:28
-
-
Save tsubaki/4977434 to your computer and use it in GitHub Desktop.
ラムダ式サンプルその1
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
void Awake() | |
{ | |
Function( err =>{ Debug.Log(err); }); // 1 | |
Function( DebugLog ); // 2 | |
} | |
// 1と2に必要 | |
delegate void ErrorMessage(string str); | |
void Function(ErrorMessage err) | |
{ | |
if( err != null) | |
err("ERROR!!!!!"); | |
} | |
// 2のみ必要 | |
void DebugLog(string err) | |
{ | |
Debug.Log(err); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment