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); }
public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes) { TerrainType rough = terrainAttributes.GetRoughTerrain(); rough.SetFriction(rough.GetFriction() * 5 / 4f); }
public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes) { TerrainType green = terrainAttributes.GetGreenTerrain(); green.SetFriction(green.GetFriction() * 4 / 5f); }
public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes) { TerrainType bunker = terrainAttributes.GetBunkerTerrain(); bunker.SetFriction(bunker.GetFriction() * 5 / 4f); }