MCPcopy Create free account
hub / github.com/catabriga/graphwar / initializeImages

Method initializeImages

src/Graphwar/GraphPlane.java:749–779  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

747 }
748
749 private void initializeImages()
750 {
751 List<Player> players = graphwar.getGameData().getPlayers();
752
753 defaultImages = new Image[players.size()];
754 animationImages = new Image[players.size()][playerAnimations.length][];
755
756 for(int i=0; i<animationImages.length; i++)
757 {
758 for(int j=0; j<playerAnimations.length; j++)
759 {
760 animationImages[i][j] = new Image[playerAnimations[j].length];
761 }
762 }
763
764 for(int i=0; i<defaultImages.length; i++)
765 {
766 defaultImages[i] = addHelmet(playerDefault, players.get(i).getColor());
767 }
768
769 for(int i=0; i<animationImages.length; i++)
770 {
771 for(int j=0; j<animationImages[i].length; j++)
772 {
773 for(int k=0; k<animationImages[i][j].length; k++)
774 {
775 animationImages[i][j][k] = addHelmet(playerAnimations[j][k], players.get(i).getColor());
776 }
777 }
778 }
779 }
780
781 public void refreshBackground()
782 {

Callers 2

refreshSoldiersMethod · 0.95
startAnimatingMethod · 0.95

Calls 4

addHelmetMethod · 0.95
getGameDataMethod · 0.80
getColorMethod · 0.80
getPlayersMethod · 0.45

Tested by

no test coverage detected