diff --git a/src/data/testlevel1.json b/src/data/testlevel1.json index 7e2fcca883acfd2dd81f552f65419614275ef00d..ae04d18b51173b7d71feaa79e1477ae92fbebd43 100644 --- a/src/data/testlevel1.json +++ b/src/data/testlevel1.json @@ -18,8 +18,8 @@ { "name": "charles", "images": { - "text": "/charles-text.png", - "entity": "/charles.png" + "text": "charles-text.png", + "entity": "charles.png" }, "text_start_locations": [ { @@ -37,8 +37,8 @@ { "name": "wall", "images": { - "text": "/wall-text.png", - "entity": "/wall.png" + "text": "wall-text.png", + "entity": "wall.png" }, "text_start_locations": [ { @@ -98,7 +98,7 @@ "data": "adjectives/you" }, "images": { - "text": "/you-text.png" + "text": "you-text.png" }, "text_start_locations": [ { @@ -114,7 +114,7 @@ "data": "adjectives/push" }, "images": { - "text": "/push-text.png" + "text": "push-text.png" }, "text_start_locations": [ { @@ -133,7 +133,7 @@ } }, "images": { - "text": "/stop-text.png" + "text": "stop-text.png" }, "text_start_locations": [ { diff --git a/src/data/testlevel2.json b/src/data/testlevel2.json index 02301cb719da0033ea76fb8cfe973e28fff40635..09c411cf0540854e86a0d9074296791995e73627 100644 --- a/src/data/testlevel2.json +++ b/src/data/testlevel2.json @@ -23,8 +23,8 @@ { "name": "charles", "images": { - "text": "/charles-text.png", - "entity": "/charles.png" + "text": "charles-text.png", + "entity": "charles.png" }, "text_start_locations": [ { @@ -41,8 +41,8 @@ }, { "name": "flag", "images": { - "text": "/flag-text.png", - "entity": "/flag.png" + "text": "flag-text.png", + "entity": "flag.png" }, "text_start_locations": [ { @@ -60,8 +60,8 @@ { "name": "wall", "images": { - "text": "/wall-text.png", - "entity": "/wall.png" + "text": "wall-text.png", + "entity": "wall.png" }, "text_start_locations": [ { @@ -257,7 +257,7 @@ "data": "adjectives/you" }, "images": { - "text": "/you-text.png" + "text": "you-text.png" }, "text_start_locations": [ { @@ -273,7 +273,7 @@ "data": "adjectives/push" }, "images": { - "text": "/push-text.png" + "text": "push-text.png" }, "text_start_locations": [ { @@ -293,7 +293,7 @@ } }, "images": { - "text": "/stop-text.png" + "text": "stop-text.png" }, "text_start_locations": [ { @@ -312,7 +312,7 @@ } }, "images": { - "text": "/win-text.png" + "text": "win-text.png" }, "text_start_locations": [ { diff --git a/src/game/Level.js b/src/game/Level.js index fc7d38bb6d142cddb3290771167b0744d76034ca..1495c267a2dc5720aa1716623e26912ad53341d3 100644 --- a/src/game/Level.js +++ b/src/game/Level.js @@ -82,7 +82,7 @@ export default class Level { if (source.hasOwnProperty('connectors')) { for (const { x, y, type: cType } of source.connectors) { const entity = new Entity([x, y], textNoun) - entity.fallbackImage = `/${ cType }-text.png` + entity.fallbackImage = `${ cType }-text.png` entity.meta = { type: 'connector', name: cType, diff --git a/src/render/Level.js b/src/render/Level.js index 015f6f3e9c16d8da9c45e2eb61faf9430dc8c8f8..5f7dac99b79aa6b810a3d974cb8e6301db2aa3b3 100644 --- a/src/render/Level.js +++ b/src/render/Level.js @@ -95,7 +95,7 @@ export default class Level extends React.Component<Props> { <div className="level-container"> {[...range(width)].map(x => [...range(height)].map(y => ( - <img src="/background.png" className="level-tile" style={{ + <img src="background.png" className="level-tile" style={{ left: (margin * x) + (x * 32 * scale), top: (margin * y) + (y * 32 * scale), width: size * scale, @@ -123,7 +123,7 @@ export default class Level extends React.Component<Props> { const top = (margin * y) + (y * 32 * scale) return ( - <img className="level-entity" src={`/${ cType }-text.png`} style={{ + <img className="level-entity" src={`${ cType }-text.png`} style={{ left, top, width: size * scale,