nouveautés sons
This commit is contained in:
commit
f05e05a091
BIN
core/assets/player0-0.png
Normal file
BIN
core/assets/player0-0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
core/assets/player0-1.png
Normal file
BIN
core/assets/player0-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
core/assets/player0-2.png
Normal file
BIN
core/assets/player0-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
core/assets/player0-3.png
Normal file
BIN
core/assets/player0-3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
BIN
core/assets/sounds/SWSH_Whoosh 3 (ID 1795)_LS.mp3
Normal file
BIN
core/assets/sounds/SWSH_Whoosh 3 (ID 1795)_LS.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/TOONTwang_Plante cartoon 6 (ID 1955)_LS.mp3
Normal file
BIN
core/assets/sounds/TOONTwang_Plante cartoon 6 (ID 1955)_LS.mp3
Normal file
Binary file not shown.
36
core/assets/sounds/credits.txt
Normal file
36
core/assets/sounds/credits.txt
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
MUSIQUE :
|
||||||
|
|
||||||
|
menu pause :
|
||||||
|
House
|
||||||
|
Bensound
|
||||||
|
"Royalty Free Music from Bensound" : https://www.bensound.com/royalty-free-music/track/house
|
||||||
|
|
||||||
|
menu principal :
|
||||||
|
|
||||||
|
Deflector
|
||||||
|
by Ghostrifter Official,
|
||||||
|
licence libre CC BY-SA 3.0 : https://soundcloud.com/ghostrifter-official
|
||||||
|
|
||||||
|
Game :
|
||||||
|
« Mercury City » de H-M O
|
||||||
|
sous licence Creative Commons BY : https://soundcloud.com/h_mo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BRUITAGES :
|
||||||
|
|
||||||
|
|
||||||
|
Cri Wilhelm
|
||||||
|
Joseph SARDIN
|
||||||
|
https://lasonotheque.org/detail-0477-cri-wilhelm.html
|
||||||
|
|
||||||
|
Flèche décochée :
|
||||||
|
Whoosh 3
|
||||||
|
Auteur : Joseph SARDIN
|
||||||
|
https://lasonotheque.org/detail-1795-whoosh-3.html
|
||||||
|
|
||||||
|
Flèche plantée
|
||||||
|
Planté cartoon 6
|
||||||
|
Auteur : Joseph SARDIN
|
||||||
|
https://lasonotheque.org/detail-1955-plante-cartoon-6.html
|
||||||
|
|
Binary file not shown.
|
@ -55,6 +55,10 @@ public class Arrow extends EntityQuad {
|
||||||
this.landed = false;
|
this.landed = false;
|
||||||
|
|
||||||
if (!preview) {
|
if (!preview) {
|
||||||
|
|
||||||
|
arrowLandedSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/TOONTwang_Plante cartoon 6 (ID 1955)_LS.mp3"));
|
||||||
|
arrowHitSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/VOXScrm_Cri wilhelm (ID 0477)_LS.wav"));
|
||||||
|
|
||||||
texture = new ArrayList<>();
|
texture = new ArrayList<>();
|
||||||
String path = "core/assets/arrow" + MathUtils.random(2);
|
String path = "core/assets/arrow" + MathUtils.random(2);
|
||||||
|
|
||||||
|
@ -210,17 +214,12 @@ public class Arrow extends EntityQuad {
|
||||||
Player player = (Player) actor;
|
Player player = (Player) actor;
|
||||||
if (player == GameScreen.playerCurrent && TTL > 19.5) continue;
|
if (player == GameScreen.playerCurrent && TTL > 19.5) continue;
|
||||||
if (Intersector.overlapConvexPolygons(player.hitbox, this.hitbox)) {
|
if (Intersector.overlapConvexPolygons(player.hitbox, this.hitbox)) {
|
||||||
landed = true;
|
|
||||||
// Make a sound when an arrow killed somebody
|
// Make a sound when an arrow killed somebody
|
||||||
if ( ! SagittariusGame.disableSounds){
|
if ( ! SagittariusGame.disableSounds){
|
||||||
long shotid = arrowHitSound.play(SagittariusGame.soundsVolume);
|
long shotid = arrowHitSound.play(SagittariusGame.soundsVolume);
|
||||||
arrowHitSound.setPitch(shotid,1.5f);
|
arrowHitSound.setPitch(shotid,1.5f);
|
||||||
}
|
}
|
||||||
GameScreen.removePlayer(player);
|
|
||||||
GameScreen.arrows.removeActor(this);
|
|
||||||
GameScreen.nextPlayer();
|
|
||||||
GameScreen.setFocus(GameScreen.playerCurrent);
|
|
||||||
// Make a sound when an arrow touched
|
|
||||||
|
|
||||||
GameScreen.removePlayer(player);
|
GameScreen.removePlayer(player);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class Bow extends Actor {
|
||||||
private boolean aimAssist = false;
|
private boolean aimAssist = false;
|
||||||
private boolean pressed = false;
|
private boolean pressed = false;
|
||||||
private float angle;
|
private float angle;
|
||||||
private Sound shotSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/fleche_decochee.mp3"));
|
private Sound shotSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/SWSH_Whoosh 3 (ID 1795)_LS.mp3"));
|
||||||
private Vector2 anchor = new Vector2();
|
private Vector2 anchor = new Vector2();
|
||||||
private Vector2 aim = new Vector2();
|
private Vector2 aim = new Vector2();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package sagittarius.model;
|
package sagittarius.model;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Input.Keys;
|
import com.badlogic.gdx.Input.Keys;
|
||||||
import com.badlogic.gdx.files.FileHandle;
|
import com.badlogic.gdx.files.FileHandle;
|
||||||
|
@ -16,7 +18,7 @@ public class Player extends EntityQuad {
|
||||||
|
|
||||||
private Planet home;
|
private Planet home;
|
||||||
private boolean active;
|
private boolean active;
|
||||||
private Texture texture;
|
private ArrayList<Texture> texture;
|
||||||
|
|
||||||
// ---------- CONSTRUCTORs ----------
|
// ---------- CONSTRUCTORs ----------
|
||||||
|
|
||||||
|
@ -29,24 +31,35 @@ public class Player extends EntityQuad {
|
||||||
|
|
||||||
this.home = home;
|
this.home = home;
|
||||||
|
|
||||||
Pixmap pm = new Pixmap(new FileHandle("core/assets/player1.png"));
|
texture = new ArrayList<>();
|
||||||
pm.setBlending(Pixmap.Blending.None);
|
String path = "core/assets/player0";
|
||||||
for (int x = 0; x < pm.getWidth(); x++) {
|
|
||||||
for (int y = 0; y < pm.getHeight(); y++) {
|
|
||||||
|
|
||||||
Color pc = new Color();
|
int i = 0;
|
||||||
Color.rgba8888ToColor(pc, pm.getPixel(x, y));
|
while (true) {
|
||||||
|
try {
|
||||||
|
Pixmap pm = new Pixmap(new FileHandle(path + "-" + i + ".png"));
|
||||||
|
pm.setBlending(Pixmap.Blending.None);
|
||||||
|
for (int x = 0; x < pm.getWidth(); x++) {
|
||||||
|
for (int y = 0; y < pm.getHeight(); y++) {
|
||||||
|
|
||||||
if (pc.r == 1 && pc.g == 1 && pc.b == 1) {
|
Color pc = new Color();
|
||||||
pc.r = color.r;
|
Color.rgba8888ToColor(pc, pm.getPixel(x, y));
|
||||||
pc.g = color.g;
|
|
||||||
pc.b = color.b;
|
if (pc.r == 1 && pc.g == 1 && pc.b == 1) {
|
||||||
|
pc.r = color.r;
|
||||||
|
pc.g = color.g;
|
||||||
|
pc.b = color.b;
|
||||||
|
}
|
||||||
|
|
||||||
|
pm.drawPixel(x, y, Color.rgba8888(pc));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
texture.add(new Texture(pm));
|
||||||
pm.drawPixel(x, y, Color.rgba8888(pc));
|
i++;
|
||||||
|
} catch (com.badlogic.gdx.utils.GdxRuntimeException e) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
texture = new Texture(pm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- METHODs ----------
|
// ---------- METHODs ----------
|
||||||
|
@ -60,8 +73,8 @@ public class Player extends EntityQuad {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(Batch batch, float parentAlpha) {
|
public void draw(Batch batch, float parentAlpha) {
|
||||||
batch.draw(texture, getPosition().x - getWidth()/2, getPosition().y - getHeight()/2, this.getWidth()/2, this.getHeight()/2, getWidth(), getHeight(),
|
batch.draw(texture.get(0), getPosition().x - getWidth()/2, getPosition().y - getHeight()/2, getWidth()/2, getHeight()/2, getWidth(), getHeight(),
|
||||||
1, 1, getRotation(), 0, 0, texture.getWidth(), texture.getHeight(), false, false);
|
1, 1, getRotation(), 0, 0, texture.get(0).getWidth(), texture.get(0).getHeight(), false, false);
|
||||||
super.draw(batch, parentAlpha);
|
super.draw(batch, parentAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,11 +101,11 @@ public class SettingsScreen extends BaseScreen {
|
||||||
// Table structure
|
// Table structure
|
||||||
table.add(gConstField).width(250);
|
table.add(gConstField).width(250);
|
||||||
table.row();
|
table.row();
|
||||||
table.add(disableMusic).width(250);
|
table.add(disableMusic).align(Align.left);
|
||||||
table.row();
|
table.row();
|
||||||
table.add(musicVolume).width(250);
|
table.add(musicVolume).width(250);
|
||||||
table.row();
|
table.row();
|
||||||
table.add(disableSounds).width(250);
|
table.add(disableSounds).align(Align.left);
|
||||||
table.row();
|
table.row();
|
||||||
table.add(musicSounds).width(250);
|
table.add(musicSounds).width(250);
|
||||||
table.row();
|
table.row();
|
||||||
|
|
Loading…
Reference in a new issue