Water tile fix 2. More info below:

Water tile now support multiple rectangle in one texture. As such, this fix the ability to use multiple water texture in the game.
This commit is contained in:
jianmingyong 2016-11-11 15:59:13 +08:00
parent db9b3ed673
commit 3fd5716f8e
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@
Dim r As New Rectangle(CInt(textureData(1)), CInt(textureData(2)), CInt(textureData(3)), CInt(textureData(4))) Dim r As New Rectangle(CInt(textureData(1)), CInt(textureData(2)), CInt(textureData(3)), CInt(textureData(4)))
Dim texturePath As String = textureData(0) Dim texturePath As String = textureData(0)
Me.waterTextureName = AdditionalValue Me.waterTextureName = AdditionalValue
If Water.WaterTexturesTemp.ContainsKey(texturePath & r.ToString() & "_0") = False Then If Water.WaterTexturesTemp.ContainsKey(AdditionalValue & "_0") = False Then
Water.WaterTexturesTemp.Add(AdditionalValue & "_0", TextureManager.GetTexture(texturePath, New Rectangle(r.X, r.Y, r.Width, r.Height))) Water.WaterTexturesTemp.Add(AdditionalValue & "_0", TextureManager.GetTexture(texturePath, New Rectangle(r.X, r.Y, r.Width, r.Height)))
Water.WaterTexturesTemp.Add(AdditionalValue & "_1", TextureManager.GetTexture(texturePath, New Rectangle(r.X + r.Width, r.Y, r.Width, r.Height))) Water.WaterTexturesTemp.Add(AdditionalValue & "_1", TextureManager.GetTexture(texturePath, New Rectangle(r.X + r.Width, r.Y, r.Width, r.Height)))
Water.WaterTexturesTemp.Add(AdditionalValue & "_2", TextureManager.GetTexture(texturePath, New Rectangle(r.X + r.Width * 2, r.Y, r.Width, r.Height))) Water.WaterTexturesTemp.Add(AdditionalValue & "_2", TextureManager.GetTexture(texturePath, New Rectangle(r.X + r.Width * 2, r.Y, r.Width, r.Height)))