This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Main() | |
{ | |
Gate a = new Gate(0); | |
Gate b = new Gate(100); | |
var ctx = new TravelContext(a, b); | |
// Github interpreter, provide a more baked in one for release versions of the game | |
var ruleProvider = new GithubInterpreter("project", "hash", "credentials"); | |
var time = ctx.Get(ruleProvider).TravelTime; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Key | |
: KeyTrait<ValueType> | |
// ^ ^ Type of the value this key supplies | |
// | Implement a trait indicating this is a key | |
{ | |
} | |
//usage | |
Key k = whatever(); //Get a key object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!Building | |
Aliases: | |
- &residential_floor_count !NormalValue | |
Min: 5 | |
Max: 10 | |
Floors: | |
- !Repeat | |
Count: !NormalValue | |
Min: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geometry.Union(geometry | |
.CreatePrism(material, points.Quickhull2D().ToArray(), height) | |
.Translate(new Vector3(0, this.GroundOffset(height), 0)) | |
.Transform(InverseWorldTransformation), | |
false | |
); | |
geometry.Union(geometry | |
.CreatePrism(material, points.Quickhull2D().ToArray(), height) | |
.Translate(new Vector3(0, this.GroundOffset(height), 0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IManager {} | |
public interface IManager<T> : IManager { public void AddComponent(T comp); } | |
public GraphicsManager : IManager<Sprite>, IManager<Camera> | |
{ | |
... | |
} | |
public void World | |
{ |