diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-09-02 10:13:25 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-09-02 10:13:57 +0200 |
commit | c298eb988874bc2cf3adb39c2532419ec76a24bc (patch) | |
tree | 76e888a3f9c5c789cb0579e490901584c1357897 /game/entity.cpp | |
parent | 8af1284654a4a5d454a559eca371bf0ac3c79786 (diff) |
all imp sprites + train problems solved
Diffstat (limited to 'game/entity.cpp')
-rw-r--r-- | game/entity.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/game/entity.cpp b/game/entity.cpp index 8362c40..f127150 100644 --- a/game/entity.cpp +++ b/game/entity.cpp @@ -1,3 +1,11 @@ #include "entity.h" #include <iostream> -;
\ No newline at end of file + + +int EntityClass::from_string (std::string str) { + if (str == "inf") return EntityInfo::Class::inf; + if (str == "cav") return EntityInfo::Class::cav; + if (str == "ran") return EntityInfo::Class::ran; + if (str == "sie") return EntityInfo::Class::sie; + if (str == "bld") return EntityInfo::Class::bld; +}
\ No newline at end of file |