Created
May 8, 2015 17:23
-
-
Save suakig/c39b3098706e8d886008 to your computer and use it in GitHub Desktop.
ArgumentChangeStringToMethod.cs
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 UnityEngine; | |
using System; | |
using System.Collections; | |
public class ArgumentChangeStringToMethod : MonoBehaviour | |
{ | |
/// <summary> | |
/// 関数,呼出までの遅延秒数 | |
/// </summary> | |
/// <param name="action">Action.</param> | |
/// <param name="time">Time.</param> | |
public void Invoke(Action action, float time) | |
{ | |
Invoke (action.Method.Name, time); | |
} | |
/// <summary> | |
/// 関数,初回呼出までの遅延秒数,次回呼出までの遅延秒数 | |
/// </summary> | |
/// <param name="action">Action.</param> | |
/// <param name="time">Time.</param> | |
/// <param name="repeatRate">Repeat rate.</param> | |
public void InvokeRepeating (Action action, float time, float repeatRate) | |
{ | |
InvokeRepeating (action.Method.Name, time, repeatRate); | |
} | |
public void SendMessage (Action action) | |
{ | |
SendMessage (action.Method.Name); | |
} | |
public void SendMessage (Action action, object value) | |
{ | |
SendMessage (action.Method.Name, value); | |
} | |
public void SendMessage (Action action, SendMessageOptions options) | |
{ | |
SendMessage (action.Method.Name, options); | |
} | |
public void SendMessage (Action action, object value, SendMessageOptions options) | |
{ | |
SendMessage (action.Method.Name, value, options); | |
} | |
public void BroadcastMessage (Action action) | |
{ | |
BroadcastMessage (action.Method.Name); | |
} | |
public void BroadcastMessage (Action action, object value) | |
{ | |
BroadcastMessage (action.Method.Name, value); | |
} | |
public void BroadcastMessage (Action action, SendMessageOptions options) | |
{ | |
BroadcastMessage (action.Method.Name, options); | |
} | |
public void BroadcastMessage (Action action, object value, SendMessageOptions options) | |
{ | |
BroadcastMessage (action.Method.Name, value, options); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment