Browse Source

Screwed around in the extendArray(), because it didn't work sometimes...

What the....? Well it works THIS way...
hutattedonmyarm 12 years ago
parent
commit
5fc968b6ef
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      CubeControl/AnimationUtility.java

+ 7
- 6
CubeControl/AnimationUtility.java View File

57
 			if (sc.hasNextLine()) {
57
 			if (sc.hasNextLine()) {
58
 				sc.nextLine();
58
 				sc.nextLine();
59
 			}
59
 			}
60
-			extendArray(animations);
60
+			animations = extendArray(animations);
61
 			animations[animations.length - 1] = tmp;
61
 			animations[animations.length - 1] = tmp;
62
 		} while (sc.hasNextLine());
62
 		} while (sc.hasNextLine());
63
 
63
 
64
 		return animations;
64
 		return animations;
65
 	}
65
 	}
66
 
66
 
67
-	private static void extendArray(Animation[] animations) {
68
-		Animation newArray[] = new Animation[animations.length + 1];
69
-		for (int i = 0; i < animations.length; i++) {
70
-			newArray[i] = animations[i];
67
+	private static Animation[] extendArray(Animation[] animationArray) {
68
+		Animation newArray[] = new Animation[animationArray.length + 1];
69
+		for (int i = 0; i < animationArray.length; i++) {
70
+			newArray[i] = animationArray[i];
71
 		}
71
 		}
72
-		animations = newArray;
72
+		//animations = newArray;
73
+		return newArray;
73
 	}
74
 	}
74
 
75
 
75
 	/**
76
 	/**

Loading…
Cancel
Save