Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9234e71371 | |||
| 0d08245f66 | |||
| 8582021ca4 | |||
| bead53795d | |||
| 5f67e85598 | |||
| 0de2841523 | |||
| 1bee884ae1 | |||
| 1aee091b18 | |||
| 44be3536b2 | |||
| c3fbdf6794 |
@@ -0,0 +1,6 @@
|
|||||||
|
Étant étudiant a l’IUT de Laval chaque semestre nous avons des projets a réalisé ce semestre le projet est un jeu vidéo Android nome le choc des histoires nous avions accès qu’au sdk Android(contrainte placé par les enseignants) donc le projet fut complexe et long a développé de nombreux problème furent éviter en utilisant les canevas pour l’affichage vu que le temps nécessaire pour réaliser le même code en OpenGL aurait été trop long
|
||||||
|
|
||||||
|
ce dépôt git contient que le code Android de l’application
|
||||||
|
le serveur se trouve sur https://github.com/Marc-Pierre-Barbier/PTS3-SERVEUR
|
||||||
|
et un faux serveur et client furent crée ici https://github.com/Marc-Pierre-Barbier/PTS3-FAKE-SERVER-CLIENT
|
||||||
|
affin de debugger l’application
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.iutlaval.myapplication">
|
package="com.iutlaval.myapplication">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
@@ -10,8 +13,9 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity android:name=".MainActivity"
|
<activity android:name=".Credit"></activity>
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
@@ -19,8 +23,11 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name=".GameActivity"
|
<activity
|
||||||
android:screenOrientation="landscape">
|
android:name=".GameActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||||
|
android:screenOrientation="landscape"
|
||||||
|
android:keepScreenOn="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.iutlaval.myapplication;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
public class Credit extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_credit);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -63,7 +63,7 @@ public class Mythes_Hermione extends Card {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Hermione, fille de Ménélas";
|
return "Hermione";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class Mythes_Oedipie extends Card {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Oedipe, Maudit malgrés lui";
|
return "Oedipe";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class Mythes_Sémélé extends Card {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Sémélé, Mére de Dionysos";
|
return "Sémélé";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ public class Renaissance_Succession_Bourgogne extends Card {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Guerre de succession de Bourgogne";
|
return "Succession de Bourgogne";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,15 +6,17 @@ import android.content.SharedPreferences;
|
|||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.media.AudioManager;
|
||||||
|
import android.media.MediaPlayer;
|
||||||
|
import android.media.SoundPool;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.iutlaval.myapplication.Game.Cards.Card;
|
import com.iutlaval.myapplication.Game.Cards.Card;
|
||||||
import com.iutlaval.myapplication.Game.Cards.CardRegistery;
|
import com.iutlaval.myapplication.Game.Cards.CardRegistery;
|
||||||
import com.iutlaval.myapplication.GameActivity;
|
import com.iutlaval.myapplication.GameActivity;
|
||||||
import com.iutlaval.myapplication.MainActivity;
|
import com.iutlaval.myapplication.MainActivity;
|
||||||
import com.iutlaval.myapplication.PopupRunable;
|
|
||||||
import com.iutlaval.myapplication.R;
|
import com.iutlaval.myapplication.R;
|
||||||
import com.iutlaval.myapplication.Video.Drawables.DrawableBitmap;
|
import com.iutlaval.myapplication.Video.Drawables.DrawableBitmap;
|
||||||
import com.iutlaval.myapplication.Video.Drawables.DrawableCard;
|
import com.iutlaval.myapplication.Video.Drawables.DrawableCard;
|
||||||
@@ -30,15 +32,23 @@ import java.lang.reflect.Constructor;
|
|||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class GameLogicThread extends Thread{
|
public class GameLogicThread extends Thread implements SoundPool.OnLoadCompleteListener,MediaPlayer.OnCompletionListener {
|
||||||
|
|
||||||
public static final float BUTTON_Y_POS = 45F;
|
public static final float BUTTON_Y_POS = 45F;
|
||||||
public static final int BUTTON_X_POS = 0;
|
public static final int BUTTON_X_POS = 0;
|
||||||
public static final float BUTTON_X_SIZE = 20F;
|
public static final float BUTTON_X_SIZE = 20F;
|
||||||
public static final float BUTTON_Y_SIZE = 10F;
|
public static final float BUTTON_Y_SIZE = 10F;
|
||||||
public static final String BUTTONTURN_DRAWABLE_NAME = "buttonturn";
|
public static final String BUTTON_TURN_DRAWABLE_NAME = "buttonturn";
|
||||||
private Context cont;
|
|
||||||
|
//les constantes des id des sons
|
||||||
|
public static final String CARD_SOUND = "card";
|
||||||
|
public static final String FIGHT_SOUND = "fight";
|
||||||
|
public static final String WIN_SOUND = "win";
|
||||||
|
public static final String LOSE_SOUND = "lose";
|
||||||
|
|
||||||
|
|
||||||
private Renderer renderer;
|
private Renderer renderer;
|
||||||
private boolean ready;
|
private boolean ready;
|
||||||
private TouchHandler touch;
|
private TouchHandler touch;
|
||||||
@@ -65,20 +75,26 @@ public class GameLogicThread extends Thread{
|
|||||||
private int requestCardZone =-1;
|
private int requestCardZone =-1;
|
||||||
private boolean requestPlaceCardResult;
|
private boolean requestPlaceCardResult;
|
||||||
|
|
||||||
|
private boolean soundPoolLoaded = false;
|
||||||
|
private HashMap<String, Integer> soundMap;
|
||||||
|
private int loopMusic;
|
||||||
|
private SoundPool soundPool;
|
||||||
|
private MediaPlayer backgroundMusicPlayer;
|
||||||
|
|
||||||
//si mise a true alors le thread va envoyer un message au serveur lui disant de passer a la phase suivante
|
//si mise a true alors le thread va envoyer un message au serveur lui disant de passer a la phase suivante
|
||||||
private boolean requestEnd = false;
|
private boolean requestEnd = false;
|
||||||
|
|
||||||
public GameLogicThread(GameActivity gameActivity, String deckName, Renderer renderer)
|
public GameLogicThread(GameActivity gameActivity, String deckName, Renderer renderer)
|
||||||
{
|
{
|
||||||
|
this.gameActivity = gameActivity;
|
||||||
this.deckName=deckName;
|
this.deckName=deckName;
|
||||||
|
this.renderer = renderer;
|
||||||
|
|
||||||
Log.e("RESOLUTION:",""+GameActivity.screenWidth+"x"+GameActivity.screenHeight);
|
Log.e("RESOLUTION:",""+GameActivity.screenWidth+"x"+GameActivity.screenHeight);
|
||||||
ready=false;
|
ready=false;
|
||||||
this.cont = gameActivity;
|
|
||||||
this.renderer = renderer;
|
|
||||||
board=new Board();
|
board=new Board();
|
||||||
touch = new TouchHandler(renderer,this,gameActivity);
|
touch = new TouchHandler(renderer,this,gameActivity);
|
||||||
hand = new Hand();
|
hand = new Hand();
|
||||||
this.gameActivity=gameActivity;
|
|
||||||
GameActivity.setGameEngine(this);
|
GameActivity.setGameEngine(this);
|
||||||
isYourMainPhase =false;
|
isYourMainPhase =false;
|
||||||
cancelled=false;
|
cancelled=false;
|
||||||
@@ -95,8 +111,8 @@ public class GameLogicThread extends Thread{
|
|||||||
Bitmap bitmapEnemyTurn = BitmapFactory.decodeResource(renderer.getResources(),R.drawable.t_pb_enemy_turn);
|
Bitmap bitmapEnemyTurn = BitmapFactory.decodeResource(renderer.getResources(),R.drawable.t_pb_enemy_turn);
|
||||||
Bitmap bitmapBattlePhase = BitmapFactory.decodeResource(renderer.getResources(),R.drawable.t_pb_battlephase);
|
Bitmap bitmapBattlePhase = BitmapFactory.decodeResource(renderer.getResources(),R.drawable.t_pb_battlephase);
|
||||||
Bitmap bitmapButtonEnd = BitmapFactory.decodeResource(renderer.getResources(),R.drawable.t_btn_boutonfintour);
|
Bitmap bitmapButtonEnd = BitmapFactory.decodeResource(renderer.getResources(),R.drawable.t_btn_boutonfintour);
|
||||||
Bitmap bitmapVictory = BitmapFactory.decodeResource(cont.getResources(), R.drawable.t_pb_victory);
|
Bitmap bitmapVictory = BitmapFactory.decodeResource(gameActivity.getResources(), R.drawable.t_pb_victory);
|
||||||
Bitmap bitmapDefeat = BitmapFactory.decodeResource(cont.getResources(), R.drawable.t_pb_defeat);
|
Bitmap bitmapDefeat = BitmapFactory.decodeResource(gameActivity.getResources(), R.drawable.t_pb_defeat);
|
||||||
|
|
||||||
Log.i("loading","prefs");
|
Log.i("loading","prefs");
|
||||||
SharedPreferences sharedPref = gameActivity.getSharedPreferences("handicape",Context.MODE_PRIVATE);
|
SharedPreferences sharedPref = gameActivity.getSharedPreferences("handicape",Context.MODE_PRIVATE);
|
||||||
@@ -105,12 +121,56 @@ public class GameLogicThread extends Thread{
|
|||||||
Bitmap bitmapBackground;
|
Bitmap bitmapBackground;
|
||||||
if(!modeHandicape)
|
if(!modeHandicape)
|
||||||
{
|
{
|
||||||
bitmapBackground = BitmapFactory.decodeResource(cont.getResources(), R.drawable.t_b_board_background);
|
bitmapBackground = BitmapFactory.decodeResource(gameActivity.getResources(), R.drawable.t_b_board_background);
|
||||||
}else{
|
}else{
|
||||||
bitmapBackground = BitmapFactory.decodeResource(cont.getResources(), R.drawable.t_b_board_background_handicapted);
|
bitmapBackground = BitmapFactory.decodeResource(gameActivity.getResources(), R.drawable.t_b_board_background_handicapted);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final int maxAudioStream = 2;
|
||||||
|
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
//déprecier aprés android lolipop
|
||||||
|
soundPool = new SoundPool(maxAudioStream, AudioManager.STREAM_MUSIC,100);
|
||||||
|
}else{
|
||||||
|
SoundPool.Builder builder = new SoundPool.Builder();
|
||||||
|
builder.setMaxStreams(maxAudioStream);
|
||||||
|
soundPool = builder.build();
|
||||||
|
}
|
||||||
|
soundPool.setOnLoadCompleteListener(this);
|
||||||
|
soundMap=new HashMap<>();
|
||||||
|
soundMap.put(FIGHT_SOUND,soundPool.load(gameActivity,R.raw.combat_sfx,1));
|
||||||
|
soundMap.put(CARD_SOUND,soundPool.load(gameActivity,R.raw.carte_jouer_sfx,1));
|
||||||
|
soundMap.put(WIN_SOUND,soundPool.load(gameActivity,R.raw.victoire,1));
|
||||||
|
soundMap.put(LOSE_SOUND,soundPool.load(gameActivity,R.raw.defaite,1));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int startSound;
|
||||||
|
switch (deckName.trim())
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Log.e("Music","unrecognized deck loading default");
|
||||||
|
case "mythes et legendes grecs":
|
||||||
|
startSound=R.raw.mytes_start;
|
||||||
|
loopMusic =R.raw.mytes_loop;
|
||||||
|
break;
|
||||||
|
case "moyen-age francais":
|
||||||
|
startSound=R.raw.moyenage_start;
|
||||||
|
loopMusic =R.raw.moyenage_loop;
|
||||||
|
break;
|
||||||
|
case "renaissance":
|
||||||
|
startSound=R.raw.renaissence_start;
|
||||||
|
loopMusic =R.raw.renaissence_loop;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
backgroundMusicPlayer = MediaPlayer.create(gameActivity,startSound);
|
||||||
|
backgroundMusicPlayer.setVolume(0.5F,0.5F);
|
||||||
|
backgroundMusicPlayer.setOnCompletionListener(this);
|
||||||
|
backgroundMusicPlayer.setScreenOnWhilePlaying(true);
|
||||||
|
backgroundMusicPlayer.start();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Log.i("ressources","base ressources loaded");
|
Log.i("ressources","base ressources loaded");
|
||||||
|
|
||||||
//adding the background
|
//adding the background
|
||||||
@@ -118,8 +178,8 @@ public class GameLogicThread extends Thread{
|
|||||||
|
|
||||||
ready=true;
|
ready=true;
|
||||||
|
|
||||||
final String host = "2.tcp.ngrok.io";//192.168.43.251tcp://2.tcp.ngrok.io:
|
final String host = "2.tcp.ngrok.io"; // adresse du serveur
|
||||||
final int port = 17057;
|
final int port = 17057; // port du serveur
|
||||||
|
|
||||||
|
|
||||||
//on fait trois essay de connection
|
//on fait trois essay de connection
|
||||||
@@ -136,7 +196,7 @@ public class GameLogicThread extends Thread{
|
|||||||
if(coms == null)
|
if(coms == null)
|
||||||
{
|
{
|
||||||
Log.e("ERROR SERVER DEAD","srv");
|
Log.e("ERROR SERVER DEAD","srv");
|
||||||
gameActivity.runOnUiThread(new PopupRunable("erreur de comunication avec le serveur",gameActivity));
|
PopupRunable.makePopup(gameActivity,R.string.comserr);
|
||||||
//on arette le moteur de rendu
|
//on arette le moteur de rendu
|
||||||
renderer.terminate();
|
renderer.terminate();
|
||||||
//et on retourne la 'activité precedente
|
//et on retourne la 'activité precedente
|
||||||
@@ -204,7 +264,7 @@ public class GameLogicThread extends Thread{
|
|||||||
case Command.GET_DECK:
|
case Command.GET_DECK:
|
||||||
coms.send(deckName);
|
coms.send(deckName);
|
||||||
String deckstr = coms.recieve();
|
String deckstr = coms.recieve();
|
||||||
deck = new NetworkDeck(deckstr,gameActivity.getBaseContext());
|
deck = new NetworkDeck(deckstr, gameActivity.getBaseContext());
|
||||||
Log.e("got deck",deckstr);
|
Log.e("got deck",deckstr);
|
||||||
break;
|
break;
|
||||||
case Command.DRAW:
|
case Command.DRAW:
|
||||||
@@ -218,46 +278,52 @@ public class GameLogicThread extends Thread{
|
|||||||
isYourMainPhase =true;
|
isYourMainPhase =true;
|
||||||
isYourBattlePhase=false;
|
isYourBattlePhase=false;
|
||||||
renderer.addToDrawWithoutUpdate(new DrawableSelfRemoving(new DrawableBitmap(bitmapYourTurn,0,0,"yourTurn",100F,50F),1));
|
renderer.addToDrawWithoutUpdate(new DrawableSelfRemoving(new DrawableBitmap(bitmapYourTurn,0,0,"yourTurn",100F,50F),1));
|
||||||
renderer.addToDraw(new DrawableBitmap(bitmapButtonEnd, BUTTON_X_POS, BUTTON_Y_POS, BUTTONTURN_DRAWABLE_NAME, BUTTON_X_SIZE, BUTTON_Y_SIZE));
|
renderer.addToDraw(new DrawableBitmap(bitmapButtonEnd, BUTTON_X_POS, BUTTON_Y_POS, BUTTON_TURN_DRAWABLE_NAME, BUTTON_X_SIZE, BUTTON_Y_SIZE));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Command.SETMANA:
|
case Command.SETMANA:
|
||||||
renderer.removeToDrawWithoutUpdate("mana");
|
renderer.removeToDrawWithoutUpdate("mana");
|
||||||
mana = coms.recieveInt();
|
mana = coms.recieveInt();
|
||||||
renderer.addToDraw(new DrawableText("Mana : "+mana,85F,60F,"mana",13.3F,6.65F,20, 100,30,Color.WHITE));
|
renderer.addToDraw(new DrawableText( gameActivity.getResources().getString(R.string.mana)+" : "+mana,85F,60F,"mana",13.3F,6.65F,20, 100,30,Color.WHITE));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Command.ENEMYTURN:
|
case Command.ENEMYTURN:
|
||||||
isYourMainPhase =false;
|
isYourMainPhase =false;
|
||||||
|
|
||||||
renderer.removeToDraw(BUTTONTURN_DRAWABLE_NAME);
|
renderer.removeToDraw(BUTTON_TURN_DRAWABLE_NAME);
|
||||||
renderer.removeToDraw("battlePhase");
|
renderer.removeToDraw("battlePhase");
|
||||||
renderer.addToDraw(new DrawableSelfRemoving(new DrawableBitmap(bitmapEnemyTurn,0,0,"enemyTurn",100F,50F),1));
|
renderer.addToDraw(new DrawableSelfRemoving(new DrawableBitmap(bitmapEnemyTurn,0,0,"enemyTurn",100F,50F),1));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Command.POPUP:
|
case Command.POPUP:
|
||||||
String recivedMessage = coms.recieve();
|
String recivedMessage = coms.recieve();
|
||||||
gameActivity.runOnUiThread(new PopupRunable(recivedMessage,gameActivity));
|
PopupRunable.makePopup(gameActivity,recivedMessage);
|
||||||
Log.e("popup",recivedMessage);
|
Log.e("popup",recivedMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Command.WIN:
|
case Command.WIN:
|
||||||
//on termine la parite
|
//on termine la parite
|
||||||
gameActivity.runOnUiThread(new PopupRunable("bravo ! vous avez gagné",gameActivity));
|
backgroundMusicPlayer.stop();
|
||||||
|
playSound(WIN_SOUND);
|
||||||
|
PopupRunable.makePopup(gameActivity,R.string.victoire);
|
||||||
renderer.addToDraw(new DrawableBitmap(bitmapVictory,0,0,"victory",100F,50F));
|
renderer.addToDraw(new DrawableBitmap(bitmapVictory,0,0,"victory",100F,50F));
|
||||||
renderer.updateFrame();
|
renderer.updateFrame();
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
currentThread().sleep(2000);
|
currentThread().sleep(2000);
|
||||||
|
|
||||||
returnToTheMainActivity();
|
returnToTheMainActivity();
|
||||||
break;
|
break;
|
||||||
case Command.LOSE:
|
case Command.LOSE:
|
||||||
//on termine la partie
|
//on termine la partie
|
||||||
gameActivity.runOnUiThread(new PopupRunable("vous avez perdu!",gameActivity));
|
backgroundMusicPlayer.stop();
|
||||||
|
playSound(LOSE_SOUND);
|
||||||
|
PopupRunable.makePopup(gameActivity,R.string.lose);
|
||||||
renderer.addToDraw(new DrawableBitmap(bitmapDefeat,0,0,"defeat",100F,50F));
|
renderer.addToDraw(new DrawableBitmap(bitmapDefeat,0,0,"defeat",100F,50F));
|
||||||
renderer.updateFrame();
|
renderer.updateFrame();
|
||||||
cancelled=true;
|
cancelled=true;
|
||||||
currentThread().sleep(2000);
|
currentThread().sleep(2000);
|
||||||
//gameativity.finish() n'etait pas utilisable il fermais l'application
|
//gameativity.finish() n'etait pas utilisable il fermais l'application
|
||||||
|
|
||||||
returnToTheMainActivity();
|
returnToTheMainActivity();
|
||||||
break;
|
break;
|
||||||
case Command.PING:
|
case Command.PING:
|
||||||
@@ -274,7 +340,7 @@ public class GameLogicThread extends Thread{
|
|||||||
//on instancie la carte recu
|
//on instancie la carte recu
|
||||||
Class<? extends Card> c = CardRegistery.get(cardId);
|
Class<? extends Card> c = CardRegistery.get(cardId);
|
||||||
Constructor con = c.getConstructor(String.class, Context.class);
|
Constructor con = c.getConstructor(String.class, Context.class);
|
||||||
Card cardPlayed = (Card) con.newInstance("enemy"+zone,gameActivity);
|
Card cardPlayed = (Card) con.newInstance("enemy"+zone, gameActivity);
|
||||||
cardPlayed.getDrawableCard().setOnBoard(true);
|
cardPlayed.getDrawableCard().setOnBoard(true);
|
||||||
|
|
||||||
//ajout de la carte au rendu
|
//ajout de la carte au rendu
|
||||||
@@ -284,6 +350,7 @@ public class GameLogicThread extends Thread{
|
|||||||
//ajout la card au terain
|
//ajout la card au terain
|
||||||
cardPlayed.getDrawableCard().setDraggable(false);
|
cardPlayed.getDrawableCard().setDraggable(false);
|
||||||
board.setEnemyCard(zone,cardPlayed);
|
board.setEnemyCard(zone,cardPlayed);
|
||||||
|
playSound(CARD_SOUND);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Command.MEULE:
|
case Command.MEULE:
|
||||||
@@ -315,13 +382,13 @@ public class GameLogicThread extends Thread{
|
|||||||
|
|
||||||
case Command.SET_ENEMY_HP:
|
case Command.SET_ENEMY_HP:
|
||||||
renderer.removeToDrawWithoutUpdate("advHp");
|
renderer.removeToDrawWithoutUpdate("advHp");
|
||||||
renderer.addToDraw(new DrawableText(" Hp : " + coms.recieve(),1F,10F,"advHp",13.3F,6.65F,20, 100,30,Color.WHITE));
|
renderer.addToDraw(new DrawableText(gameActivity.getResources().getString(R.string.hp)+" : " + coms.recieve(),1F,10F,"advHp",13.3F,6.65F,20, 100,30,Color.WHITE));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Command.SET_HP:
|
case Command.SET_HP:
|
||||||
renderer.removeToDrawWithoutUpdate("playerHp");
|
renderer.removeToDrawWithoutUpdate("playerHp");
|
||||||
renderer.addToDraw(new DrawableText(" Hp : " + coms.recieve(),85F,80F,"playerHp",13.3F,6.65F,20, 100,30,Color.WHITE));
|
renderer.addToDraw(new DrawableText(gameActivity.getResources().getString(R.string.hp)+ " : " + coms.recieve(),85F,80F,"playerHp",13.3F,6.65F,20, 100,30,Color.WHITE));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Command.SET_CARD_HP :
|
case Command.SET_CARD_HP :
|
||||||
@@ -415,7 +482,6 @@ public class GameLogicThread extends Thread{
|
|||||||
renderer.moveToDraw(i* DrawableCard.getCardWith(),90F,c.getDrawableCard().getName());
|
renderer.moveToDraw(i* DrawableCard.getCardWith(),90F,c.getDrawableCard().getName());
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -458,8 +524,6 @@ public class GameLogicThread extends Thread{
|
|||||||
|
|
||||||
protected synchronized boolean setOnCardPlayedRequest(DrawableCard card,int zone)
|
protected synchronized boolean setOnCardPlayedRequest(DrawableCard card,int zone)
|
||||||
{
|
{
|
||||||
Log.e("request","recived");
|
|
||||||
|
|
||||||
//on ne peut pas avoir 2 requette simultané
|
//on ne peut pas avoir 2 requette simultané
|
||||||
while(!requestPlaceCardDone)
|
while(!requestPlaceCardDone)
|
||||||
{
|
{
|
||||||
@@ -480,6 +544,10 @@ public class GameLogicThread extends Thread{
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(requestPlaceCardResult)
|
||||||
|
{
|
||||||
|
playSound(CARD_SOUND);
|
||||||
|
}
|
||||||
return requestPlaceCardResult;
|
return requestPlaceCardResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,7 +558,6 @@ public class GameLogicThread extends Thread{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//on ne peut pas avoir 2 requette simultané
|
//on ne peut pas avoir 2 requette simultané
|
||||||
while(!requestAttackDone) {
|
while(!requestAttackDone) {
|
||||||
try {
|
try {
|
||||||
@@ -512,6 +579,8 @@ public class GameLogicThread extends Thread{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
playSound(FIGHT_SOUND);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -562,10 +631,7 @@ public class GameLogicThread extends Thread{
|
|||||||
{
|
{
|
||||||
requestEnd=true;
|
requestEnd=true;
|
||||||
}else{
|
}else{
|
||||||
Toast t = new Toast(gameActivity);
|
PopupRunable.makePopup(gameActivity,R.string.notYourTurn);
|
||||||
t.setText("IT'S NOT YOUR TURN BE PATIENT");
|
|
||||||
t.setDuration(Toast.LENGTH_SHORT);
|
|
||||||
t.show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,5 +639,39 @@ public class GameLogicThread extends Thread{
|
|||||||
return isYourBattlePhase;
|
return isYourBattlePhase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadComplete(final SoundPool soundPool, int sampleId, int status) {
|
||||||
|
soundPoolLoaded=true;
|
||||||
|
Log.e("sound","ready");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void playSound(String sound)
|
||||||
|
{
|
||||||
|
if(soundPoolLoaded){
|
||||||
|
if(soundMap.get(sound) != null)
|
||||||
|
{
|
||||||
|
soundPool.play(soundMap.get(sound),1.0f,1.0f,1,0,1f);
|
||||||
|
Log.i("sound","playing " + sound);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
Log.i("sound","not found " + sound);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lance la boucle de la musique a la fin de l'introduction de la mussique
|
||||||
|
* @param mp
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onCompletion(MediaPlayer mp) {
|
||||||
|
mp.reset();
|
||||||
|
backgroundMusicPlayer = MediaPlayer.create(gameActivity, loopMusic);
|
||||||
|
backgroundMusicPlayer.setVolume(0.5F,0.5F);
|
||||||
|
backgroundMusicPlayer.setOnCompletionListener(this);
|
||||||
|
backgroundMusicPlayer.setScreenOnWhilePlaying(true);
|
||||||
|
backgroundMusicPlayer.start();
|
||||||
|
backgroundMusicPlayer.setLooping(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.iutlaval.myapplication.Game;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.iutlaval.myapplication.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cette classe permet de faire des toast en dehors de du thread de l'activité
|
||||||
|
*/
|
||||||
|
public class PopupRunable implements Runnable{
|
||||||
|
String recivedMessage;
|
||||||
|
Context context;
|
||||||
|
|
||||||
|
private PopupRunable(Activity cont, String recivedMessage)
|
||||||
|
{
|
||||||
|
this.recivedMessage=recivedMessage;
|
||||||
|
this.context=cont;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast popupToast = Toast.makeText(context,recivedMessage,Toast.LENGTH_LONG);
|
||||||
|
popupToast.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* affiche un toast avec le texte provenant de l'id donné (R.string.*)
|
||||||
|
* @param activity
|
||||||
|
* @param stringId
|
||||||
|
*/
|
||||||
|
public static void makePopup(Activity activity,int stringId)
|
||||||
|
{
|
||||||
|
String recivedMessage = activity.getResources().getString(stringId);
|
||||||
|
activity.runOnUiThread(new PopupRunable(activity,recivedMessage));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* affiche un toast avec le texte passé en argument
|
||||||
|
* @param activity
|
||||||
|
* @param message
|
||||||
|
*/
|
||||||
|
public static void makePopup(Activity activity,String message)
|
||||||
|
{
|
||||||
|
activity.runOnUiThread(new PopupRunable(activity,message));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -41,13 +41,12 @@ public class GameActivity extends Activity {
|
|||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
|
||||||
String deck = getIntent().getStringExtra("DECK");
|
String deck = getIntent().getStringExtra("DECK");
|
||||||
|
|
||||||
renderer = new Renderer(getBaseContext(),deck,this);
|
renderer = new Renderer(getBaseContext(),deck,this);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setContentView(renderer);
|
setContentView(renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,5 +74,10 @@ public class GameActivity extends Activity {
|
|||||||
if(gameEngine != null)gameEngine.onTouchEvent(event);
|
if(gameEngine != null)gameEngine.onTouchEvent(event);
|
||||||
return super.onTouchEvent(event);
|
return super.onTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
//on override et on n'appelle pas la super classe pour retirer l'effet du bouton
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.iutlaval.myapplication;
|
package com.iutlaval.myapplication;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -43,6 +44,15 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
final Button creditbutton = (Button) findViewById(R.id.credit);
|
||||||
|
creditbutton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent creditIntent = new Intent(context,Credit.class);
|
||||||
|
context.startActivity(creditIntent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
disabledMode=true;
|
disabledMode=true;
|
||||||
handicapeButtonHandle(handicapeButton);
|
handicapeButtonHandle(handicapeButton);
|
||||||
}
|
}
|
||||||
@@ -63,8 +73,10 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if(!disabledMode)
|
if(!disabledMode)
|
||||||
{
|
{
|
||||||
handicapeButton.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.t_h_handicape));
|
handicapeButton.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.t_h_handicape));
|
||||||
|
handicapeButton.setContentDescription(getResources().getString(R.string.handicapeButtonon));
|
||||||
}else{
|
}else{
|
||||||
handicapeButton.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.t_h_handicape_greyed));
|
handicapeButton.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.t_h_handicape_greyed));
|
||||||
|
handicapeButton.setContentDescription(getResources().getString(R.string.handicapeButtonoff));
|
||||||
}
|
}
|
||||||
disabledMode = ! disabledMode;
|
disabledMode = ! disabledMode;
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.iutlaval.myapplication;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
public class PopupRunable implements Runnable{
|
|
||||||
String recivedMessage;
|
|
||||||
Context context;
|
|
||||||
|
|
||||||
public PopupRunable(String recivedMessage, Context context)
|
|
||||||
{
|
|
||||||
this.recivedMessage=recivedMessage;
|
|
||||||
this.context=context;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Toast popupToast = Toast.makeText(context,recivedMessage,Toast.LENGTH_LONG);
|
|
||||||
popupToast.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -159,7 +159,7 @@ public class DrawableCard extends Drawable{
|
|||||||
if(c.getDescription() != null)
|
if(c.getDescription() != null)
|
||||||
cardDescription = new DrawableText(c.getDescription(),0,0,toString()+"description",DESCRIPTION_WIDTH*ratio,DESCRIPTION_HEIGHT*ratio,DESCRIPTION_FONT_SIZE,DESCRIPTION_TEXT_X_RES,DESCRIPTION_TEXT_Y_RES,Color.BLACK);
|
cardDescription = new DrawableText(c.getDescription(),0,0,toString()+"description",DESCRIPTION_WIDTH*ratio,DESCRIPTION_HEIGHT*ratio,DESCRIPTION_FONT_SIZE,DESCRIPTION_TEXT_X_RES,DESCRIPTION_TEXT_Y_RES,Color.BLACK);
|
||||||
|
|
||||||
cardTitle = new DrawableText(c.getName(),0,0,toString()+"name",TITLE_WIDTH*ratio,TITLE_HEIGHT*ratio,TITLE_FONT_SIZE*0.75F,TEXT_TITLE_X_RES,TEXT_TITLE_Y_RES,Color.BLACK,30);
|
cardTitle = new DrawableText(c.getName(),0,0,toString()+"name",TITLE_WIDTH*ratio,TITLE_HEIGHT*ratio,TITLE_FONT_SIZE*0.75F,TEXT_TITLE_X_RES,TEXT_TITLE_Y_RES,Color.BLACK,26);
|
||||||
|
|
||||||
|
|
||||||
cardCostDrawable = new DrawableText(c.getCost() + "", 0, 0, toString() + "cost", OFFBOARD_ATK_HP_WIDTH*ratio, OFFBOARD_ATK_HP_HEIGHT*ratio, HP_ATK_FONT_SIZE, TEXT_ATK_HP_X_RES, TEXT_ATK_HP_Y_RES,Color.BLACK);
|
cardCostDrawable = new DrawableText(c.getCost() + "", 0, 0, toString() + "cost", OFFBOARD_ATK_HP_WIDTH*ratio, OFFBOARD_ATK_HP_HEIGHT*ratio, HP_ATK_FONT_SIZE, TEXT_ATK_HP_X_RES, TEXT_ATK_HP_Y_RES,Color.BLACK);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 532 KiB After Width: | Height: | Size: 643 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 110 KiB |
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".Credit">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="186dp"
|
||||||
|
android:src="@drawable/t_im_iut"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.6"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:text="@string/creditText"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/textView3"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/copyright"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:alpha="1"
|
android:alpha="1"
|
||||||
|
android:contentDescription="@string/acceuilphoto"
|
||||||
android:rotation="0"
|
android:rotation="0"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -22,27 +23,11 @@
|
|||||||
app:layout_constraintVertical_bias="0.0"
|
app:layout_constraintVertical_bias="0.0"
|
||||||
app:srcCompat="@drawable/t_b_batiut" />
|
app:srcCompat="@drawable/t_b_batiut" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView2"
|
|
||||||
android:layout_width="400dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="@font/alfa_slab_one"
|
|
||||||
android:text="Le Choc des Histoires"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="#A6FF9800"
|
|
||||||
android:textSize="30sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.454"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="0.672" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/playButton"
|
android:id="@+id/playButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Jouer"
|
android:text="@string/play"
|
||||||
android:textScaleX="1"
|
android:textScaleX="1"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -56,7 +41,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:text="Carte"
|
android:text="@string/card"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/playButton"
|
app:layout_constraintEnd_toEndOf="@+id/playButton"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
@@ -71,13 +56,24 @@
|
|||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginBottom="32dp"
|
android:layout_marginBottom="32dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
|
android:contentDescription="@string/handicapeButtonoff"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/t_h_handicape_greyed"
|
android:src="@drawable/t_h_handicape_greyed"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.92"
|
app:layout_constraintHorizontal_bias="0.92"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/credit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/credit"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/handicapeButton"
|
||||||
|
app:layout_constraintHorizontal_bias="0.25"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView2"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.95" />
|
app:layout_constraintVertical_bias="0.93" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,4 +4,18 @@
|
|||||||
<string name="title_item_detail">Item Detail</string>
|
<string name="title_item_detail">Item Detail</string>
|
||||||
<string name="pickdeck">Choisissez votre deck</string>
|
<string name="pickdeck">Choisissez votre deck</string>
|
||||||
<string name="handicape">false</string>
|
<string name="handicape">false</string>
|
||||||
|
<string name="credit">Qui sommes nous</string>
|
||||||
|
<string name="creditText">"Nous sommes un groupe quatre étudiants du département informatique de l\'IUT de Laval nommés Marc BARBIER, Antoine GALBRUN, Clément CHERBONNIER et Adrien LIGOT. Cette application a été créée dans le cadre de notre projet tuteuré du semestre 3 en s'inspirant des jeux Hearthstone et Magic The Gathering mais sur un thème historique."</string>
|
||||||
|
<string name="copyright">les effet sonores de victoires et de defaite vienne de mixkit.co</string>
|
||||||
|
<string name="play">Jouer</string>
|
||||||
|
<string name="card">Carte</string>
|
||||||
|
<string name="handicapeButtonoff">bouton handicape off</string>
|
||||||
|
<string name="handicapeButtonon">bouton handicape on</string>
|
||||||
|
<string name="acceuilphoto">Le choc des Histoires </string>
|
||||||
|
<string name="mana">mana</string>
|
||||||
|
<string name="victoire">bravo vous avez gagné</string>
|
||||||
|
<string name="hp">PV</string>
|
||||||
|
<string name="lose">vous avez perdu</string>
|
||||||
|
<string name="notYourTurn">"ce n\'est pas votre tours soyez patient"</string>
|
||||||
|
<string name="comserr">"erreur de comunication avec le serveur"</string>
|
||||||
</resources>
|
</resources>
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user