Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes)
    {
        TerrainType rough = terrainAttributes.GetRoughTerrain();

        rough.SetFriction(rough.GetFriction() * 5 / 4f);
    }
Ejemplo n.º 3
0
    public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes)
    {
        TerrainType green = terrainAttributes.GetGreenTerrain();

        green.SetFriction(green.GetFriction() * 4 / 5f);
    }
Ejemplo n.º 4
0
    public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes)
    {
        TerrainType bunker = terrainAttributes.GetBunkerTerrain();

        bunker.SetFriction(bunker.GetFriction() * 5 / 4f);
    }