继续我的游戏,我想增加一些难度等等。
从 C# 到 Objective-C,我希望我能有一些像这样的枚举
typedef enum GameTypes{
Classic = 0,
Unlimited,
Timed,
Expert,
} GameType;
typedef enum GameDifficultys
{
Easy = 0,
Medium,
Hard,
} GameDifficulty;
然后有这样的东西:
GameType gameType = GameTypes.Classic;
GameDifficulty gameDifficulty = GameDifficultys.Easy;
但是我收到以下错误:
Unknown type name "GameType"/"GameDifficulty"
这可能像在 C# 中一样吗?
谢谢