y‚RDƒQ[ƒ€ƒGƒ“ƒWƒ“ ..
[2ch|₯Menu]
553:–Ό‘O‚ΝŠJ”­’†‚Μ‚ΰ‚Μ‚Ε‚·B
15/07/26 18:14:10.17 D3ATScL/.net
>>545
C#‚ΜSystem.Action‚Ζ‚©System.Func‚Μ”z—ρ‚πŽg‚€‚Ζ—Η‚’‚ζ
Action‚Νvoid‚ΘŠΦ”AFunc‚Ν–ί‚θ’l‚ΜŒ^‚πŽw’θ‚΅‚ΔŽg‚€
// action‚Μ”z—ρ
private System.Action<string> [] actionList;
// action‚ΦŠΦ”‚̐ݒθ
void Start () {
actionList = new System.Action<string>[10];
actionList[0] = Action1;
actionList[1] = Action2;
// more actions
}
// i‚Μ’l‚Ε‰½‚©‚πŽΐs
void ExecuteAction(int i)
{
actionList[i](i.ToString());
}
void Action1(string val)
{
Debug.Log("Action1:"+val);
}
void Action2(string val)
{
Debug.Log("Action2:"+val);
}
// and many funcs


ŽŸƒy[ƒW
‘±‚«‚π•\ަ
1‚π•\ަ
ΕVƒŒƒX•\ަ
ƒXƒŒƒbƒh‚ΜŒŸυ
—ήŽ—ƒXƒŒˆκ——
˜b‘θ‚Μƒjƒ…[ƒX
‚¨‚ά‚©‚ΉƒŠƒXƒg
₯ƒIƒvƒVƒ‡ƒ“‚π•\ަ
‰Ι‚Β‚Τ‚΅2ch

3753“ϊ‘O‚ɍXV/302 KB
’S“–:undef