Skip to content

Instantly share code, notes, and snippets.

public interface IManager {}
public interface IManager<T> : IManager { public void AddComponent(T comp); }
public GraphicsManager : IManager<Sprite>, IManager<Camera>
{
...
}
public void World
{
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))
!Building
Aliases:
- &residential_floor_count !NormalValue
Min: 5
Max: 10
Floors:
- !Repeat
Count: !NormalValue
Min: 1
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
@Quantumplation
Quantumplation / demo.cs
Last active November 15, 2015 03:13 — forked from martindevans/demo.cs
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;
}