CryEngine out on GitHub
This might be fun to look through; first thing I saw that I never thought of before was how to define flag enums.<p>From <a href="https://github.com/CRYTEK-CRYENGINE/CRYENGINE/blob/release/Code/CryEngine/Cry3DEngine/BreakableGlassRenderNode.cpp" rel="nofollow">https://github.com/CRYTEK-CRYENGINE/CRYENGINE/blob/release/C...</a>:<p><pre><code>    // State flags
    enum EGlassRNState
    {
    	EGlassRNState_Initial     = 0,
    	EGlassRNState_Weakened    = 1 << 0,
    	EGlassRNState_Shattering  = 1 << 1,
    	EGlassRNState_Shattered   = 1 << 2,
    	EGlassRNState_ActiveFrags = 1 << 3
    };
</code></pre>
Als a C# dev, I write Enum flags from time to time, but I always just write out the values; never thought of using bit-shifting to prevent typos :)