예제 #1
0
 private static string GetPrefixForWallKickType(Tetromino.WallKickType wallKickType)
 {
     if (wallKickType == Tetromino.WallKickType.ITetrominoRotation)
     {
         return("[I]");
     }
     return("[D]");
 }
예제 #2
0
        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 });
        }