EventStruct派发全局静态类
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
public enum GameEvent
{
START_GAME,
END_GAME
}
public class EventCallBack
{
protected System.Object[] arguments; //参数
protected GameEvent type; //事件类型
protected System.Object sender; //发送者
// bean函数
public GameEvent Type
{
get { return type; }
set { type = value; }
}
public System.Object[] Params
{
get { return arguments; }
set { arguments = value; }
}
public System.Object Sender
{
get { return sender; }
set { sender = value; }
}
// 常用函数
public override string ToString()
{
return type + " [