Last active
December 14, 2015 11:38
-
-
Save haxpor/5080097 to your computer and use it in GitHub Desktop.
Type Traits (test) - according to my SO http://stackoverflow.com/questions/15191315/how-to-check-type-directly-from-type-that-passed-through-template-function-not-f/15191385.
This file contains hidden or 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
template <> | |
struct ObjectSpawner::EnemyTraits<Zombie01> { const int enemy_type = (int)ZOMBIE_01; }; |
This file contains hidden or 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
template <typename T> | |
struct EnemyTraits { }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment