Esempio n. 1
0
 IDrawable GetNewTexture(AutoTile.PartType partType, Vector2I position, float xOffset = 0F, float yOffset = 0F)
 {
     IDrawable texture = GetNewTexture(partType);
     texture.Position = (position.ToVector2() + new SFML.Window.Vector2f(xOffset, yOffset)) * GameData.TILE_SIZE;
     return texture;
 }
Esempio n. 2
0
 public AutoTile(AutoTile copy)
     : this(new Texture(copy.BaseTexture))
 {
 }
Esempio n. 3
0
        public void SetBase(Texture baseTexture, int width = DEFAULT_WIDTH, int height = DEFAULT_HEIGHT, int highness = DEFAULT_HIGHNESS)
        {
            BaseTexture = baseTexture;

            AutoTile = new AutoTile(BaseTexture);
            WallAutoTile = new AutoTile(BaseTexture, true);

            Width = width;
            Height = height;
            Highness = highness;

            GroundTextures = new IDrawable[Height, Width];
            WallTextures = new IDrawable[Highness, Width];

            Build();
        }