Exemple #1
0
        public override void EndInit()
        {
            try
            {
                this.InstanceId = IdGenerater.GenerateId();

                this.componentDict.Clear();

                if (this.components != null)
                {
                    foreach (Component component in this.components)
                    {
                        component.Parent = this;
                        this.componentDict.Add(component.GetType(), component);
                    }
                }
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }
Exemple #2
0
 protected Component()
 {
     this.InstanceId = IdGenerater.GenerateId();
     Game.EventSystem.Add(this);
 }