//////////////// protected CustomEntity(CustomEntityConstructor ctor) { var myctor = ctor as CustomEntityConstructor; if (this.OwnerPlayer != null) { this.OwnerPlayerWho = this.OwnerPlayer.whoAmI; this.OwnerPlayerUID = PlayerIdentityHelpers.GetProperUniqueId(this.OwnerPlayer); } else { this.OwnerPlayerWho = -1; this.OwnerPlayerUID = ""; } if (myctor != null) { this.Core = this.CreateCore(myctor); this.Components = this.CreateComponents(myctor); } else { this.Core = this.CreateCoreTemplate(); this.Components = this.CreateComponentsTemplate(); } }
protected override CustomEntityCore CreateCore(CustomEntityConstructor factory) { throw new HamstarException("CreateCore not implemented"); }
//////////////// protected override IList <CustomEntityComponent> CreateComponents(CustomEntityConstructor factory) { throw new HamstarException("CreateComponents not implemented"); }
protected abstract IList <CustomEntityComponent> CreateComponents(CustomEntityConstructor factory);
//////////////// protected abstract CustomEntityCore CreateCore(CustomEntityConstructor factory);