Beispiel #1
0
    public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes)
    {
        TerrainType rough = terrainAttributes.GetRoughTerrain();

        rough.SetLieRate(rough.GetLieRate() + 0.10f);
        rough.SetLieRange(rough.GetLieRange() * 0.5f);
    }
Beispiel #2
0
    public override void Apply(PlayerAttributes playerAttributes, TerrainAttributes terrainAttributes)
    {
        TerrainType bunker = terrainAttributes.GetBunkerTerrain();

        bunker.SetLieRate(bunker.GetLieRate() + 0.10f);
        bunker.SetLieRange(bunker.GetLieRange() * 0.5f);
    }
Beispiel #3
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);
    }
Beispiel #4
0
 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));
 }