private void AccumulateRightHandShape(HandShapeSetter.HandShapeTypes type) { //今と同じ値を指定: ガン無視 if (type == _rightHandShape) { _nextRightHandShape = type; _nextRightHandShapeCount = 0; return; } if (type != _nextRightHandShape) { _nextRightHandShapeCount = 0; _nextRightHandShape = type; } //デフォルトへ戻す: 一発許可 if (type == HandShapeSetter.HandShapeTypes.Default) { _rightHandShape = HandShapeSetter.HandShapeTypes.Default; _nextRightHandShape = HandShapeSetter.HandShapeTypes.Default; _nextRightHandShapeCount = 0; _setting.handShapeSetter.SetHandShape(HandShapeSetter.HandTypes.Right, HandShapeSetter.HandShapeTypes.Default); return; } //デフォルト以外: 5回連続したらOK _nextRightHandShapeCount++; if (_nextRightHandShapeCount > 5) { _rightHandShape = type; _nextRightHandShapeCount = 0; _setting.handShapeSetter.SetHandShape(HandShapeSetter.HandTypes.Right, _rightHandShape); } }
private void AccumulateLeftHandShape(HandShapeSetter.HandShapeTypes type) { //今と同じ値を指定: 無視 if (type == _leftHandShape) { _nextLeftHandShape = type; _nextLeftHandShapeCount = 0; return; } if (type != _nextLeftHandShape) { _nextLeftHandShapeCount = 0; _nextLeftHandShape = type; } //デフォルトへ戻す: 一発許可 if (type == HandShapeSetter.HandShapeTypes.Default) { _leftHandShape = HandShapeSetter.HandShapeTypes.Default; _nextLeftHandShape = HandShapeSetter.HandShapeTypes.Default; _nextLeftHandShapeCount = 0; handShapeSetter.SetHandShape(HandShapeSetter.HandTypes.Left, HandShapeSetter.HandShapeTypes.Default); return; } //デフォルト以外: 5回連続したらOK _nextLeftHandShapeCount++; if (_nextLeftHandShapeCount > 5) { _leftHandShape = type; _nextLeftHandShapeCount = 0; handShapeSetter.SetHandShape(HandShapeSetter.HandTypes.Left, _leftHandShape); } }