示例#1
0
文件: AutoTile.cs 项目: jpx/blazera
 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;
 }
示例#2
0
文件: AutoTile.cs 项目: jpx/blazera
 public AutoTile(AutoTile copy)
     : this(new Texture(copy.BaseTexture))
 {
 }
示例#3
0
文件: Wall.cs 项目: eickegao/Blazera
        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();
        }