TerrainData.cs 523 B

1234567891011121314151617181920212223242526
  1. using UnityEngine;
  2. using System.Collections;
  3. [CreateAssetMenu()]
  4. public class TerrainData : UpdatableData {
  5. public float uniformScale = 2.5f;
  6. public bool useFlatShading;
  7. public bool useFalloff;
  8. public float meshHeightMultiplier;
  9. public AnimationCurve meshHeightCurve;
  10. public float minHeight {
  11. get {
  12. return uniformScale * meshHeightMultiplier * meshHeightCurve.Evaluate (0);
  13. }
  14. }
  15. public float maxHeight {
  16. get {
  17. return uniformScale * meshHeightMultiplier * meshHeightCurve.Evaluate (1);
  18. }
  19. }
  20. }