Changeset b2d7893 in lost-haven for main/LostHavenRPG.java
- Timestamp:
- Feb 20, 2021, 6:43:24 PM (4 years ago)
- Branches:
- master
- Children:
- 4d8825f
- Parents:
- a49176d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/LostHavenRPG.java
ra49176d rb2d7893 122 122 this.auxState = AuxState.None; 123 123 loadMapElements(); 124 this.imgMap = ImageIO.read(getClass().getResource(" ../images/mapLarge.png"));124 this.imgMap = ImageIO.read(getClass().getResource("/images/mapLarge.png")); 125 125 map = new Map("map.png", "structInfo2.txt", landMap, structMap, true); 126 126 this.startPoint = new Point(7050, 6150); … … 165 165 Animation anmTitle = new Animation("title", 144, 0, 512, 95, 83, true); 166 166 try { 167 anmTitle.addFrame(ImageIO.read(getClass().getResource(" ../images/Frame1.png")));168 anmTitle.addFrame(ImageIO.read(getClass().getResource(" ../images/Frame2.png")));169 anmTitle.addFrame(ImageIO.read(getClass().getResource(" ../images/Frame3.png")));170 anmTitle.addFrame(ImageIO.read(getClass().getResource(" ../images/Frame4.png")));171 anmTitle.addFrame(ImageIO.read(getClass().getResource(" ../images/Frame5.png")));172 imgSub = ImageIO.read(getClass().getResource(" ../images/imgSub.png"));173 imgAdd = ImageIO.read(getClass().getResource(" ../images/imgAdd.png"));174 imgSkillSub = ImageIO.read(getClass().getResource(" ../images/imgSkillSub.png"));175 imgSkillAdd = ImageIO.read(getClass().getResource(" ../images/imgSkillAdd.png"));167 anmTitle.addFrame(ImageIO.read(getClass().getResource("/images/Frame1.png"))); 168 anmTitle.addFrame(ImageIO.read(getClass().getResource("/images/Frame2.png"))); 169 anmTitle.addFrame(ImageIO.read(getClass().getResource("/images/Frame3.png"))); 170 anmTitle.addFrame(ImageIO.read(getClass().getResource("/images/Frame4.png"))); 171 anmTitle.addFrame(ImageIO.read(getClass().getResource("/images/Frame5.png"))); 172 imgSub = ImageIO.read(getClass().getResource("/images/imgSub.png")); 173 imgAdd = ImageIO.read(getClass().getResource("/images/imgAdd.png")); 174 imgSkillSub = ImageIO.read(getClass().getResource("/images/imgSkillSub.png")); 175 imgSkillAdd = ImageIO.read(getClass().getResource("/images/imgSkillAdd.png")); 176 176 } catch (IOException ioe) { 177 177 ioe.printStackTrace(); … … 322 322 for (int x = 0; x < this.wndTutorials.length; x++) { 323 323 this.wndTutorials[x] = new Window("tut" + x, 0, 0, 800, 600, true); 324 this.wndTutorials[x].add(new Button("screen", 0, 0, 800, 600, ImageIO.read(getClass().getResource(" ../images/Tutorial/ss" + (x + 1) + ".png"))));324 this.wndTutorials[x].add(new Button("screen", 0, 0, 800, 600, ImageIO.read(getClass().getResource("/images/Tutorial/ss" + (x + 1) + ".png")))); 325 325 this.wndTutorials[x].add(this.wndTutOptions); 326 326 MultiTextbox multiTextbox = new MultiTextbox("text", 305, 5, 490, 100, "", false, font12, metrics); … … 432 432 try { 433 433 imgBow = new BufferedImage[8]; 434 imgBow[0] = ImageIO.read(getClass().getResource(" ../images/projectiles/bowNN.png"));435 imgBow[1] = ImageIO.read(getClass().getResource(" ../images/projectiles/bowNE.png"));436 imgBow[2] = ImageIO.read(getClass().getResource(" ../images/projectiles/bowEE.png"));437 imgBow[3] = ImageIO.read(getClass().getResource(" ../images/projectiles/bowSE.png"));438 imgBow[4] = ImageIO.read(getClass().getResource(" ../images/projectiles/bowSS.png"));439 imgBow[5] = ImageIO.read(getClass().getResource(" ../images/projectiles/bowSW.png"));440 imgBow[6] = ImageIO.read(getClass().getResource(" ../images/projectiles/bowWW.png"));441 imgBow[7] = ImageIO.read(getClass().getResource(" ../images/projectiles/bowNW.png"));434 imgBow[0] = ImageIO.read(getClass().getResource("/images/projectiles/bowNN.png")); 435 imgBow[1] = ImageIO.read(getClass().getResource("/images/projectiles/bowNE.png")); 436 imgBow[2] = ImageIO.read(getClass().getResource("/images/projectiles/bowEE.png")); 437 imgBow[3] = ImageIO.read(getClass().getResource("/images/projectiles/bowSE.png")); 438 imgBow[4] = ImageIO.read(getClass().getResource("/images/projectiles/bowSS.png")); 439 imgBow[5] = ImageIO.read(getClass().getResource("/images/projectiles/bowSW.png")); 440 imgBow[6] = ImageIO.read(getClass().getResource("/images/projectiles/bowWW.png")); 441 imgBow[7] = ImageIO.read(getClass().getResource("/images/projectiles/bowNW.png")); 442 442 BufferedReader in = new BufferedReader(new FileReader("items.txt")); 443 443 while (in.ready()) { … … 487 487 waterSprites = loadSprites("water"); 488 488 try { 489 passiveAura = ImageIO.read(getClass().getResource(" ../images/spells/auras/passiveAura.png"));490 thornsAura = ImageIO.read(getClass().getResource(" ../images/spells/auras/thornsAura.png"));491 confuseAura = ImageIO.read(getClass().getResource(" ../images/spells/auras/confuseAura.png"));492 sandAura = ImageIO.read(getClass().getResource(" ../images/spells/auras/sandAura.png"));489 passiveAura = ImageIO.read(getClass().getResource("/images/spells/auras/passiveAura.png")); 490 thornsAura = ImageIO.read(getClass().getResource("/images/spells/auras/thornsAura.png")); 491 confuseAura = ImageIO.read(getClass().getResource("/images/spells/auras/confuseAura.png")); 492 sandAura = ImageIO.read(getClass().getResource("/images/spells/auras/sandAura.png")); 493 493 } catch (IOException ioe) { 494 494 ioe.printStackTrace(); … … 499 499 BufferedImage[] sprites = new BufferedImage[8]; 500 500 try { 501 sprites[0] = ImageIO.read(getClass().getResource(" ../images/spells/" + name + "/" + name + "SpellNN.png"));502 sprites[1] = ImageIO.read(getClass().getResource(" ../images/spells/" + name + "/" + name + "SpellNE.png"));503 sprites[2] = ImageIO.read(getClass().getResource(" ../images/spells/" + name + "/" + name + "SpellEE.png"));504 sprites[3] = ImageIO.read(getClass().getResource(" ../images/spells/" + name + "/" + name + "SpellSE.png"));505 sprites[4] = ImageIO.read(getClass().getResource(" ../images/spells/" + name + "/" + name + "SpellSS.png"));506 sprites[5] = ImageIO.read(getClass().getResource(" ../images/spells/" + name + "/" + name + "SpellSW.png"));507 sprites[6] = ImageIO.read(getClass().getResource(" ../images/spells/" + name + "/" + name + "SpellWW.png"));508 sprites[7] = ImageIO.read(getClass().getResource(" ../images/spells/" + name + "/" + name + "SpellNW.png"));501 sprites[0] = ImageIO.read(getClass().getResource("/images/spells/" + name + "/" + name + "SpellNN.png")); 502 sprites[1] = ImageIO.read(getClass().getResource("/images/spells/" + name + "/" + name + "SpellNE.png")); 503 sprites[2] = ImageIO.read(getClass().getResource("/images/spells/" + name + "/" + name + "SpellEE.png")); 504 sprites[3] = ImageIO.read(getClass().getResource("/images/spells/" + name + "/" + name + "SpellSE.png")); 505 sprites[4] = ImageIO.read(getClass().getResource("/images/spells/" + name + "/" + name + "SpellSS.png")); 506 sprites[5] = ImageIO.read(getClass().getResource("/images/spells/" + name + "/" + name + "SpellSW.png")); 507 sprites[6] = ImageIO.read(getClass().getResource("/images/spells/" + name + "/" + name + "SpellWW.png")); 508 sprites[7] = ImageIO.read(getClass().getResource("/images/spells/" + name + "/" + name + "SpellNW.png")); 509 509 } catch (IOException ioe) { 510 510 ioe.printStackTrace();
Note:
See TracChangeset
for help on using the changeset viewer.