diff --git a/appinfo.json b/appinfo.json index 6096da8..302bee5 100644 --- a/appinfo.json +++ b/appinfo.json @@ -29,13 +29,13 @@ "type": "font" }, { - "file": "images/umbreon-front", - "name": "IMAGES_UMBREON_FRONT", + "file": "images/charizard-back.png", + "name": "IMAGES_CHARIZARD_BACK_PNG", "type": "png" }, { - "file": "images/charizard-back", - "name": "IMAGES_CHARIZARD_BACK", + "file": "images/umbreon-front.png", + "name": "IMAGES_UMBREON_FRONT_PNG", "type": "png" }, { diff --git a/resources/images/charizard-back b/resources/images/charizard-back.png similarity index 100% rename from resources/images/charizard-back rename to resources/images/charizard-back.png diff --git a/resources/images/umbreon-front b/resources/images/umbreon-front.png similarity index 100% rename from resources/images/umbreon-front rename to resources/images/umbreon-front.png diff --git a/src/app.js b/src/app.js index 89b68d5..f1ceaa1 100644 --- a/src/app.js +++ b/src/app.js @@ -33,6 +33,19 @@ var infoRect = new UI.Rect({ backgroundColor: 'white' }); +var yourPokemon = new UI.Image({ + image: 'images/charizard-back.png', + position: new Vector2(52, 4), + size: new Vector2(144, 144) +}); +battleWind.add(yourPokemon); +var opponentPokemon = new UI.Image({ + image: 'images/umbreon-front.png', + position: new Vector2(80, 4), + size: new Vector2(144, 144) +}); +battleWind.add(opponentPokemon); + var yourHP = new UI.Rect({ size: new Vector2(52, 5), position: new Vector2(72, 100), @@ -227,7 +240,7 @@ attackMenu.on('click', 'back', function (e) { }); attackMenu.on('select', function (e) { // Select attack - infoText.text = "Charizard uses " + e.item.title; + infoText.text("Charizard uses " + e.item.title); battleWind.show(); }); @@ -236,7 +249,7 @@ switchMenu.on('click', 'back', function (e) { }); switchMenu.on('select', function (e) { // Switch pokemon - infoText.text = "Come back, Charizard! Go " + e.item.title + "!"; + infoText.text("Come back, Charizard! Go " + e.item.title + "!"); battleWind.show(); });