Last active
August 29, 2015 14:19
-
-
Save tsubaki/16954265a710e46d86e5 to your computer and use it in GitHub Desktop.
IEventSystemHandlerを継承したインターフェースのメソッドを呼び出す 説明用その2
This file contains 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.Collections; | |
using UnityEngine.EventSystems; | |
public class Sender : MonoBehaviour | |
{ | |
[SerializeField] | |
private int count = 30; | |
void Start () | |
{ | |
// インターフェースを継承しているコンポーネントのメソッドを呼び出し | |
ExecuteEvents.Execute<IRecieveMessage>( | |
target: gameObject, // 呼び出す対象のオブジェクト | |
eventData: null, // イベントデータ(モジュール等の情報) | |
functor: (recieveTarget,y)=>recieveTarget.OnRecieve(count)); // 操作 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment