better system for texture terrain.
This commit is contained in:
parent
3aa6b5bc83
commit
443b3a319d
9 changed files with 120 additions and 69 deletions
|
|
@ -11,12 +11,12 @@ public class Terrain {
|
|||
subTerrains.Add(sousTerrain);
|
||||
}
|
||||
|
||||
public int DetermineSubTerrain(float pitch) {
|
||||
public SubTerrain DetermineSubTerrain(float pitch) {
|
||||
foreach (var terrain in subTerrains) {
|
||||
if (terrain.MatchesPitch(pitch)) {
|
||||
return terrain.terrainIndex;
|
||||
return terrain;
|
||||
}
|
||||
}
|
||||
return terrainIndex;
|
||||
return subTerrains.First();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue