using ServerCommon; using ServerCore; using ServerBase; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GameServer { public class CustomDefinedUi : EntityBase { public CustomDefinedUi(EntityBase parent) : base(EntityType.CustomDefinedUi, parent) { } public override async Task onInit() { var parent = getDirectParent(); NullReferenceCheckHelper.throwIfNull(parent, () => $"parent is null !!!"); addEntityAttribute(new CustomDefinedUiAttribute(this, parent)); return await base.onInit(); } public override string toBasicString() { var custom_defined_ui_attribute = getOriginEntityAttribute(); NullReferenceCheckHelper.throwIfNull(custom_defined_ui_attribute, () => $"custom_defined_ui_attribute is null !!!"); return $"{this.getTypeName()}, UIKey:{custom_defined_ui_attribute.UiKey}, UILength:{custom_defined_ui_attribute.CustomDefinedUi.Length}"; } public override string toSummaryString() { var custom_defined_ui_attribute = getOriginEntityAttribute(); NullReferenceCheckHelper.throwIfNull(custom_defined_ui_attribute, () => $"custom_defined_ui_attribute is null !!!"); return $"{this.getTypeName()}, {custom_defined_ui_attribute.toBasicString()}"; } } }