コード例 #1
0
ファイル: TerrainChunk.cs プロジェクト: 628426/Strive.NET
        public void Clear(float x, float z)
        {
            float tx = (x - Position.X) / _width * Constants.terrainPieceTextureWidth * Constants.terrainHeightsPerChunk;
            float tz = (z - Position.Z) / _height * Constants.terrainPieceTextureWidth * Constants.terrainHeightsPerChunk;

            _texture.Clear(tx, tz, Constants.terrainPieceTextureWidth, Constants.terrainPieceTextureWidth);
        }
コード例 #2
0
 /// <summary>
 /// Clears the texture and sets all pixels to the default clear color.
 /// </summary>
 public void Clear()
 {
     _nativeTexture.Clear();
 }