Ejemplo n.º 1
0
        protected override CustomEntityCore CreateCore <T>(CustomEntityFactory <T> factory)
        {
            Vector2 pos = factory.OwnerPlayer.Center;

            pos.Y -= 16;
            pos.X  = MathHelper.Clamp(pos.X, 160, (Main.maxTilesX - 10) * 16);
            pos.Y  = MathHelper.Clamp(pos.Y, 160, (Main.maxTilesY - 10) * 16);

            string name = factory.OwnerPlayer.name + "'s Train";

            var core = new CustomEntityCore(name, 64, 48, pos, 1)
            {
                Center = pos
            };

            return(core);
        }
Ejemplo n.º 2
0
        ////////////////

        protected override IList <CustomEntityComponent> CreateComponents <T>(CustomEntityFactory <T> factory)
        {
            return(this.CreateComponents());
        }