private static string GetPrefixForWallKickType(Tetromino.WallKickType wallKickType) { if (wallKickType == Tetromino.WallKickType.ITetrominoRotation) { return("[I]"); } return("[D]"); }
public static Vector2[] GetTestOffsets(Tetromino.WallKickType wallKickType, float fromAngleInDegrees, float toAngleInDegrees) { string dictionaryKey = GetPrefixForWallKickType(wallKickType) + GetRotationStateForAngle(fromAngleInDegrees) + "->" + GetRotationStateForAngle(toAngleInDegrees); Vector2[] testPositions; if (_srsWallKickData.TryGetValue(dictionaryKey, out testPositions)) { return(testPositions); } return(new Vector2[] { Vector2.zero }); }