Beispiel #1
0
 private static int GetKeyStrokeInt(PlayerPrefKey playerPrefKey, DefaultKeyStroke defaultKeyStroke)
 {
     if (!PlayerPrefs.HasKey(playerPrefKey.ToString()))
     {
         return(Convert.ToInt32(defaultKeyStroke));
     }
     return(PlayerPrefs.GetInt(playerPrefKey.ToString()));
 }
Beispiel #2
0
 public static KeyCode GetKeyStroke(PlayerPrefKey playerPrefKey, DefaultKeyStroke defaultKeyStroke)
 {
     return((KeyCode)Enum.Parse(typeof(KeyCode), Convert.ToString(GetKeyStrokeInt(playerPrefKey, defaultKeyStroke))));
 }
Beispiel #3
0
 public static Char GetKeyStrokeChar(PlayerPrefKey playerPrefKey, DefaultKeyStroke defaultKeyStroke)
 {
     return(Convert.ToChar(GetKeyStrokeInt(playerPrefKey, defaultKeyStroke)));
 }