-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTerrainData.cs
50 lines (42 loc) · 1.41 KB
/
TerrainData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
namespace PaperMiniMaker {
public class TerrainArt {
public string Url {get; set;}
}
public enum TerrainKind {
Freestanding,
Clip,
Floor,
Platform,
}
public static class TerrainKindMethods {
public static string Description(this TerrainKind size) {
return size switch {
TerrainKind.Freestanding => "Freestanding images supported by a flat base.",
TerrainKind.Clip => "Decoration which can be slid over freestanding walls, good for doors or windows.",
TerrainKind.Floor => "Flat image for laying on the ground, good for carpets or trap doors.",
TerrainKind.Platform => "Slightly raised box with no bottom, good for applying elevation to maps.",
_ => string.Empty
};
}
public static bool UsesSupportWalls (this TerrainKind size) {
return size switch {
TerrainKind.Platform => true,
_ => false
};
}
}
public class Terrain {
public string Name {get; set;}
public TerrainKind Kind {get; set;}
public TerrainArt Art {get; set;}
public TerrainArt FrontBackSupportArt {get; set;}
public TerrainArt LeftRightSupportArt {get; set;}
public int Replicas {get; set;}
public float Length {get; set;}
public float Height {get; set;}
public float Depth {get; set;}
public double HalfHeight => Height * 0.5f;
}
}