public DefDecision() { Debug.Log(this.GetType().Name); affect = new Affect(this); _funcTitle = GetDelegate <Func <string> >("Title", () => { return(string.Format("DEC_{0}_TITLE", this.GetType().Name)); }); _funcDescribe = GetDelegate <Func <string> >("Describe", () => { return(string.Format("DEC_{0}_DESC", this.GetType().Name)); }); _funcEnablePublish = GetDelegate <Func <bool> >("EnablePublish"); _funcEnableCancel = GetDelegate <Func <bool> >("EnableCancel"); _funcInitData = GetDelegate <Action>("InitData"); if (_funcInitData != null) { _funcInitData(); } _dict.Add(this.GetType().Name, this); }
public void Enable() { if (evtEnable != null) { evtEnable(this.GetType().Name); } Affect.Start(this.GetType().Name); }
public void Disable() { if (evtDisable != null) { evtDisable(this.GetType().Name); } Affect.End(this.GetType().Name); }
public DefCountryFlag() { Debug.Log(this.GetType().Name); affect = new Affect(this); describe = GetDelegate <Func <string> >("Describe", () => { return(string.Format("FLAG_{0}_DESC", this.GetType().Name)); }); _dict.Add(this.GetType().Name, this); }