void LoadSetting() { IsUsingSubThread = PlayerPrefs.GetInt("IsUsingSubThread", 0); IsShowDebugInfo = PlayerPrefs.GetInt("IsShowDebugInfo", 0); PlayerNum = PlayerPrefs.GetInt("PlayerNum", 1); SkeletonVelocityFrames = PlayerPrefs.GetInt("SkeletonVelocityFrames", 1); SkeletonVelocityMulType = (VelocityMulType)PlayerPrefs.GetInt("SkeletonVelocityMulType", 0); IsGetVelocityData = PlayerPrefs.GetInt("IsGetVelocityData", 1); }
void UpdateSelectState() { switch (typeArray[TypeIndex]) { case ConfigState.CS_IsUsingSubThread: { if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow)) { IsUsingSubThread = (IsUsingSubThread + 1) % 2; } } break; case ConfigState.CS_IsShowDebugInfo: { if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow)) { IsShowDebugInfo = (IsShowDebugInfo + 1) % 2; } } break; case ConfigState.CS_PlayerNum: { if (Input.GetKeyDown(KeyCode.LeftArrow) && PlayerNum > 1) { --PlayerNum; } else if (Input.GetKeyDown(KeyCode.RightArrow)) { ++PlayerNum; } } break; case ConfigState.CS_SkeletonVelocityFrames: { if (Input.GetKeyDown(KeyCode.LeftArrow) && SkeletonVelocityFrames > 1) { --SkeletonVelocityFrames; } else if (Input.GetKeyDown(KeyCode.RightArrow)) { ++SkeletonVelocityFrames; } } break; case ConfigState.CS_SkeletonVelocityMulType: { if (Input.GetKeyDown(KeyCode.LeftArrow)) { SkeletonVelocityMulType = VelocityMulTypeArray[((int)SkeletonVelocityMulType + VelocityMulTypeArray.Length - 1) % VelocityMulTypeArray.Length]; } else if (Input.GetKeyDown(KeyCode.RightArrow)) { SkeletonVelocityMulType = VelocityMulTypeArray[((int)SkeletonVelocityMulType + 1) % VelocityMulTypeArray.Length]; } } break; case ConfigState.CS_IsGetVelocityData: { if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow)) { IsGetVelocityData = (IsGetVelocityData + 1) % 2; } } break; } }