- Timestamp:
- Jun 4, 2020, 4:15:10 PM (5 years ago)
- Branches:
- master
- Children:
- 57674f3
- Parents:
- 5d846bb
- Location:
- main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/Creature.java
r5d846bb ra10d422 13 13 import java.awt.geom.Point2D; 14 14 15 public class Creature extends MapObject 16 { 15 public class Creature extends MapObject { 17 16 String name; 18 17 private Model model; … … 77 76 this.dead = false; 78 77 this.id = Creature.lastId; 79 ++Creature.lastId;78 Creature.lastId++; 80 79 } 81 80 -
main/Enemy.java
r5d846bb ra10d422 8 8 import java.awt.Point; 9 9 10 public class Enemy extends Creature 11 { 10 public class Enemy extends Creature { 12 11 int xpReward; 13 12 Point patrolTarget; -
main/Item.java
r5d846bb ra10d422 9 9 import utils.DynamicImage; 10 10 11 public class Item extends MapObject 12 { 11 public class Item extends MapObject { 13 12 private String name; 14 13 private DynamicImage img; -
main/MapEditor.java
r5d846bb ra10d422 40 40 import java.awt.event.KeyListener; 41 41 42 public class MapEditor implements KeyListener, MouseListener 43 { 42 public class MapEditor implements KeyListener, MouseListener { 44 43 public static final int RES_X = 1024; 45 44 public static final int RES_Y = 768; … … 96 95 boolean highLevelPlacement; 97 96 Point playerLoc; 98 Point start;99 97 100 98 public MapEditor(final GraphicsDevice device) { 101 99 this.started = false; 102 this.start = null;103 100 try { 104 101 GraphicsConfiguration gc = device.getDefaultConfiguration(); 105 gc = device.getDefaultConfiguration();106 102 (MapEditor.frmMain = new Frame(gc)).setUndecorated(true); 107 103 MapEditor.frmMain.setIgnoreRepaint(true); … … 117 113 this.mapBuffer = gc.createCompatibleImage(800, 600); 118 114 this.mapG = this.mapBuffer.getGraphics(); 119 Utils.init(gc, false);115 Utils.init(gc, RUNNING_FROM_JAR); 120 116 this.state = State.Main; 121 117 this.auxState = AuxState.None; … … 152 148 } 153 149 } 154 } 155 catch (Exception e) { 150 } catch (Exception e) { 156 151 e.printStackTrace(); 157 152 return; 158 } 159 finally { 153 } finally { 160 154 device.setFullScreenWindow(null); 161 155 } … … 1104 1098 final GraphicsDevice device = env.getDefaultScreenDevice(); 1105 1099 new MapEditor(device); 1106 } 1107 catch (Exception e) { 1100 } catch (Exception e) { 1108 1101 e.printStackTrace(); 1109 1102 } -
main/MapObject.java
r5d846bb ra10d422 5 5 import java.awt.Point; 6 6 7 public class MapObject implements Comparable<MapObject> 8 { 7 public class MapObject implements Comparable<MapObject> { 9 8 public Point loc; 10 9 public int z; … … 15 14 this.loc = new Point(x, y); 16 15 this.z = z; 17 final Bound bound = null; 18 this.selectionBound = bound; 19 this.bound = bound; 16 this.bound = null; 17 this.selectionBound = null; 20 18 } 21 19
Note:
See TracChangeset
for help on using the changeset viewer.