Пример #1
0
        ////////////////

        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();
            }
        }
Пример #2
0
 protected override CustomEntityCore CreateCore(CustomEntityConstructor factory)
 {
     throw new HamstarException("CreateCore not implemented");
 }
Пример #3
0
        ////////////////

        protected override IList <CustomEntityComponent> CreateComponents(CustomEntityConstructor factory)
        {
            throw new HamstarException("CreateComponents not implemented");
        }
Пример #4
0
 protected abstract IList <CustomEntityComponent> CreateComponents(CustomEntityConstructor factory);
Пример #5
0
        ////////////////

        protected abstract CustomEntityCore CreateCore(CustomEntityConstructor factory);