Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void Enable()
        {
            if (evtEnable != null)
            {
                evtEnable(this.GetType().Name);
            }

            Affect.Start(this.GetType().Name);
        }
Ejemplo n.º 3
0
        public void Disable()
        {
            if (evtDisable != null)
            {
                evtDisable(this.GetType().Name);
            }

            Affect.End(this.GetType().Name);
        }
Ejemplo n.º 4
0
        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);
        }