Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Dictionary<int, Definition> m_typeDefinitions = new Dictionary<int, Definition>()
- public Definition GetDefinition( EntityType type )
- {
- Definition def = null;
- int typeIndex = (int) type;
- m_typeDefinitions.TryGetValue( typeIndex, out def );
- // return "null" can be considered as a valid value,
- // and you handle the lack of stuff found in later code
- return def;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement