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); } }
protected Component() { this.InstanceId = IdGenerater.GenerateId(); Game.EventSystem.Add(this); }