SharpLibEar/Event.cs
changeset 243 cc2251d065db
parent 238 c92587ddabcd
child 253 2dae7a163fff
     1.1 --- a/SharpLibEar/Event.cs	Thu Aug 18 20:14:30 2016 +0200
     1.2 +++ b/SharpLibEar/Event.cs	Fri Aug 19 17:12:54 2016 +0200
     1.3 @@ -18,16 +18,22 @@
     1.4                  Description = "When enabled an event instance can be triggered."
     1.5              )
     1.6          ]
     1.7 -        public bool Enabled { get; set; }
     1.8 +        public bool Enabled { get; set; } = true;
     1.9  
    1.10          [DataMember]
    1.11          public List<Action> Actions = new List<Action>();
    1.12  
    1.13  
    1.14 +        protected override void DoConstruct()
    1.15 +        {
    1.16 +            base.DoConstruct();
    1.17  
    1.18 -        protected Event()
    1.19 -        {
    1.20 -            Enabled = true;
    1.21 +            // TODO: Construct properties too
    1.22 +            foreach (Action a in Actions)
    1.23 +            {
    1.24 +                a.Construct();
    1.25 +            }
    1.26 +
    1.27          }
    1.28  
    1.29