public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes) { TerrainType rough = terrainAttributes.GetRoughTerrain(); rough.SetLieRate(rough.GetLieRate() + 0.10f); rough.SetLieRange(rough.GetLieRange() * 0.5f); }
public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes) { TerrainType bunker = terrainAttributes.GetBunkerTerrain(); bunker.SetLieRate(bunker.GetLieRate() + 0.10f); bunker.SetLieRange(bunker.GetLieRange() * 0.5f); }
public bool GetTerrain(string[] arr) { string errorMessage1 = "GetTerrain {g|f|r|b|w}"; string errorMessage2 = " {friction|bounce|lieRate|lieRange}"; if (arr.Length == 2) { TerrainType terrainType = game.GetTerrainAttributes().GetTerrainType(arr[0].ToUpper()); switch (arr[1].ToLower()) { case "friction": Reply(terrainType.GetFriction().ToString()); break; case "bounce": Reply(terrainType.GetBounce().ToString()); break; case "lierate": Reply(terrainType.GetLieRate().ToString()); break; case "lierange": Reply(terrainType.GetLieRange().ToString()); break; default: Reply(errorMessage1); Reply(errorMessage2); break; } return(true); } Reply(errorMessage1); Reply(errorMessage2); return(true); }
private void RandomizeTerrainType(TerrainType tt) { tt.SetLieRate(tt.GetLieRate() + UnityEngine.Random.Range(-0.25f, 0.25f)); tt.SetLieRange(tt.GetLieRange() + UnityEngine.Random.Range(-0.10f, 0.20f)); }
public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes) { TerrainType tee = terrainAttributes.GetTeeTerrain(); tee.SetLieRate(tee.GetLieRate() + 0.05f); }