From 07a8ae7b3a7f28ea16788b8866645f467c0834c1 Mon Sep 17 00:00:00 2001 From: Jeasonfire Date: Mon, 18 May 2015 03:22:13 +0300 Subject: [PATCH] Added license text. --- .../saltosion/gladiator/GladiatorBrawler.java | 19 ++++- .../saltosion/gladiator/components/CAI.java | 17 +++++ .../gladiator/components/CCombat.java | 17 +++++ .../gladiator/components/CDestructive.java | 21 +++++- .../gladiator/components/CParticle.java | 17 +++++ .../gladiator/components/CPhysics.java | 19 ++++- .../gladiator/components/CRenderedObject.java | 17 +++++ .../saltosion/gladiator/gui/GUIManager.java | 17 +++++ .../gladiator/gui/creators/GUICreator.java | 17 +++++ .../gui/creators/GameOverGUICreator.java | 19 ++++- .../gui/creators/InGameGUICreator.java | 17 +++++ .../gui/creators/IntroGUICreator.java | 17 +++++ .../gui/creators/MainMenuGUICreator.java | 19 ++++- .../gladiator/gui/creators/WinGUICreator.java | 19 ++++- .../gladiator/gui/nodes/ButtonNode.java | 37 +++++++--- .../gladiator/gui/nodes/GUINode.java | 17 +++++ .../gladiator/gui/nodes/ImageNode.java | 17 +++++ .../gladiator/gui/nodes/TextNode.java | 17 +++++ .../gui/properties/ImageProperty.java | 19 ++++- .../gui/properties/InteractiveProperty.java | 17 +++++ .../gui/properties/TextProperty.java | 17 +++++ .../gladiator/input/IRDebugToggle.java | 17 +++++ .../com/saltosion/gladiator/input/IRJump.java | 41 +++++++---- .../saltosion/gladiator/input/IRMoveLeft.java | 19 ++++- .../gladiator/input/IRMoveRight.java | 19 ++++- .../saltosion/gladiator/input/IRSwing.java | 24 +++++-- .../gladiator/input/InputHandler.java | 31 ++++++-- .../gladiator/input/InputReceiver.java | 17 +++++ .../gladiator/input/InputReceivers.java | 17 +++++ .../gladiator/level/EntityFactory.java | 17 +++++ .../com/saltosion/gladiator/level/Level.java | 17 +++++ .../gladiator/level/LevelFactory.java | 17 +++++ .../gladiator/level/premade/Round1Level.java | 18 ++++- .../gladiator/level/premade/Round2Level.java | 17 +++++ .../gladiator/level/premade/Round3Level.java | 17 +++++ .../gladiator/level/premade/Round4Level.java | 17 +++++ .../gladiator/level/premade/Round5Level.java | 17 +++++ .../gladiator/listeners/AIListener.java | 17 +++++ .../listeners/BasicDeathListener.java | 17 +++++ .../listeners/CollisionListener.java | 17 +++++ .../gladiator/listeners/CombatListener.java | 17 +++++ .../listeners/SwingHitboxListener.java | 19 ++++- .../gladiator/listeners/ai/BerserkerAI.java | 17 +++++ .../gladiator/listeners/ai/DummyAI.java | 17 +++++ .../listeners/ai/HeavenWorshiperAI.java | 17 +++++ .../gladiator/listeners/ai/HunterAI.java | 17 +++++ .../gladiator/listeners/ai/PanicAI.java | 17 +++++ .../gladiator/listeners/ai/ScaredAI.java | 17 +++++ .../saltosion/gladiator/state/BaseState.java | 17 +++++ .../gladiator/state/GameOverState.java | 17 +++++ .../gladiator/state/InGameState.java | 17 +++++ .../saltosion/gladiator/state/IntroState.java | 17 +++++ .../gladiator/state/MainMenuState.java | 19 ++++- .../saltosion/gladiator/state/WinState.java | 17 +++++ .../saltosion/gladiator/systems/AISystem.java | 17 +++++ .../gladiator/systems/CombatSystem.java | 17 +++++ .../gladiator/systems/MiscManagerSystem.java | 27 +++++-- .../gladiator/systems/ParticleSystem.java | 17 +++++ .../gladiator/systems/PhysicsSystem.java | 19 ++++- .../gladiator/systems/RenderingSystem.java | 23 +++++- .../com/saltosion/gladiator/util/AppUtil.java | 19 ++++- .../saltosion/gladiator/util/AudioLoader.java | 37 +++++++--- .../saltosion/gladiator/util/Direction.java | 17 +++++ .../com/saltosion/gladiator/util/Global.java | 17 +++++ .../com/saltosion/gladiator/util/Jukebox.java | 51 +++++++++---- .../src/com/saltosion/gladiator/util/Log.java | 18 ++++- .../com/saltosion/gladiator/util/Name.java | 17 +++++ .../gladiator/util/SpriteLoader.java | 17 +++++ .../gladiator/util/SpriteSequence.java | 71 ++++++++++++------- 69 files changed, 1286 insertions(+), 106 deletions(-) diff --git a/core/src/com/saltosion/gladiator/GladiatorBrawler.java b/core/src/com/saltosion/gladiator/GladiatorBrawler.java index 4e0cde6..93b3999 100644 --- a/core/src/com/saltosion/gladiator/GladiatorBrawler.java +++ b/core/src/com/saltosion/gladiator/GladiatorBrawler.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator; import com.badlogic.ashley.core.Engine; @@ -54,7 +71,7 @@ public class GladiatorBrawler extends ApplicationAdapter { // Initialize GUI guiManager = new GUIManager(); AppUtil.guiManager = this.guiManager; - + // Initialize Jukebox jukebox = new Jukebox(); AppUtil.jukebox = this.jukebox; diff --git a/core/src/com/saltosion/gladiator/components/CAI.java b/core/src/com/saltosion/gladiator/components/CAI.java index f6ebfaa..e1c33cb 100644 --- a/core/src/com/saltosion/gladiator/components/CAI.java +++ b/core/src/com/saltosion/gladiator/components/CAI.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.components; import com.badlogic.ashley.core.Component; diff --git a/core/src/com/saltosion/gladiator/components/CCombat.java b/core/src/com/saltosion/gladiator/components/CCombat.java index 23be610..a7ed16f 100644 --- a/core/src/com/saltosion/gladiator/components/CCombat.java +++ b/core/src/com/saltosion/gladiator/components/CCombat.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.components; import java.util.HashMap; diff --git a/core/src/com/saltosion/gladiator/components/CDestructive.java b/core/src/com/saltosion/gladiator/components/CDestructive.java index 7f5763b..72af2e0 100644 --- a/core/src/com/saltosion/gladiator/components/CDestructive.java +++ b/core/src/com/saltosion/gladiator/components/CDestructive.java @@ -1,13 +1,30 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.components; import com.badlogic.ashley.core.Component; public class CDestructive extends Component { - + public CDestructive(float time) { this.timeLeft = time; } - + public float timeLeft = 0; } diff --git a/core/src/com/saltosion/gladiator/components/CParticle.java b/core/src/com/saltosion/gladiator/components/CParticle.java index 2357570..0ac2df2 100644 --- a/core/src/com/saltosion/gladiator/components/CParticle.java +++ b/core/src/com/saltosion/gladiator/components/CParticle.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.components; import com.badlogic.ashley.core.Component; diff --git a/core/src/com/saltosion/gladiator/components/CPhysics.java b/core/src/com/saltosion/gladiator/components/CPhysics.java index 27ca2d8..f7bcbc2 100644 --- a/core/src/com/saltosion/gladiator/components/CPhysics.java +++ b/core/src/com/saltosion/gladiator/components/CPhysics.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.components; import com.badlogic.ashley.core.Component; @@ -28,7 +45,7 @@ public class CPhysics extends Component { // Stores information about the direction last time moved in public boolean movedLeftLast = false; - + // Stores a float that tells how long the physics object must wait until it can play sounds with it's walking again. public float stepCD = 0; diff --git a/core/src/com/saltosion/gladiator/components/CRenderedObject.java b/core/src/com/saltosion/gladiator/components/CRenderedObject.java index bd7a07e..9929dbe 100644 --- a/core/src/com/saltosion/gladiator/components/CRenderedObject.java +++ b/core/src/com/saltosion/gladiator/components/CRenderedObject.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.components; import java.util.ArrayList; diff --git a/core/src/com/saltosion/gladiator/gui/GUIManager.java b/core/src/com/saltosion/gladiator/gui/GUIManager.java index ec62720..0cbde81 100644 --- a/core/src/com/saltosion/gladiator/gui/GUIManager.java +++ b/core/src/com/saltosion/gladiator/gui/GUIManager.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui; import com.saltosion.gladiator.gui.nodes.GUINode; diff --git a/core/src/com/saltosion/gladiator/gui/creators/GUICreator.java b/core/src/com/saltosion/gladiator/gui/creators/GUICreator.java index 9dae6d5..073911b 100644 --- a/core/src/com/saltosion/gladiator/gui/creators/GUICreator.java +++ b/core/src/com/saltosion/gladiator/gui/creators/GUICreator.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.creators; /** diff --git a/core/src/com/saltosion/gladiator/gui/creators/GameOverGUICreator.java b/core/src/com/saltosion/gladiator/gui/creators/GameOverGUICreator.java index 017031a..5d7f175 100644 --- a/core/src/com/saltosion/gladiator/gui/creators/GameOverGUICreator.java +++ b/core/src/com/saltosion/gladiator/gui/creators/GameOverGUICreator.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.creators; import com.saltosion.gladiator.gui.nodes.ButtonNode; @@ -18,7 +35,7 @@ public class GameOverGUICreator implements GUICreator { SpriteLoader.loadSprite(Name.MENU_BACKGROUND)); backgroundImg.setPosition(.5f, .5f); AppUtil.guiManager.getRootNode().addChild(backgroundImg); - + GUINode menuNode = new GUINode("menu-node"); menuNode.setPosition(-.5f, -.5f); backgroundImg.addChild(menuNode); diff --git a/core/src/com/saltosion/gladiator/gui/creators/InGameGUICreator.java b/core/src/com/saltosion/gladiator/gui/creators/InGameGUICreator.java index be601cd..89889ad 100644 --- a/core/src/com/saltosion/gladiator/gui/creators/InGameGUICreator.java +++ b/core/src/com/saltosion/gladiator/gui/creators/InGameGUICreator.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.creators; import com.saltosion.gladiator.gui.nodes.TextNode; diff --git a/core/src/com/saltosion/gladiator/gui/creators/IntroGUICreator.java b/core/src/com/saltosion/gladiator/gui/creators/IntroGUICreator.java index b31b9e9..ae41d74 100644 --- a/core/src/com/saltosion/gladiator/gui/creators/IntroGUICreator.java +++ b/core/src/com/saltosion/gladiator/gui/creators/IntroGUICreator.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.creators; import com.badlogic.gdx.graphics.g2d.Sprite; diff --git a/core/src/com/saltosion/gladiator/gui/creators/MainMenuGUICreator.java b/core/src/com/saltosion/gladiator/gui/creators/MainMenuGUICreator.java index 370ac1d..e3603a0 100644 --- a/core/src/com/saltosion/gladiator/gui/creators/MainMenuGUICreator.java +++ b/core/src/com/saltosion/gladiator/gui/creators/MainMenuGUICreator.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.creators; import com.badlogic.gdx.Gdx; @@ -42,7 +59,7 @@ public class MainMenuGUICreator implements GUICreator { playButtonText.setPosition(-0.039f, 0.0175f); playButton.addChild(playButtonText); menuNode.addChild(playButton); - + ButtonNode quitButton = new ButtonNode("quit_button", SpriteLoader.loadSprite(Name.BUTTON_BIG), SpriteLoader.loadSprite(Name.BUTTON_BIG_HOVER)) { @Override diff --git a/core/src/com/saltosion/gladiator/gui/creators/WinGUICreator.java b/core/src/com/saltosion/gladiator/gui/creators/WinGUICreator.java index 7f1d117..d3e5277 100644 --- a/core/src/com/saltosion/gladiator/gui/creators/WinGUICreator.java +++ b/core/src/com/saltosion/gladiator/gui/creators/WinGUICreator.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.creators; import com.saltosion.gladiator.gui.nodes.ButtonNode; @@ -18,7 +35,7 @@ public class WinGUICreator implements GUICreator { SpriteLoader.loadSprite(Name.MENU_BACKGROUND)); backgroundImg.setPosition(.5f, .5f); AppUtil.guiManager.getRootNode().addChild(backgroundImg); - + GUINode menuNode = new GUINode("menu-node"); menuNode.setPosition(-.5f, -.5f); backgroundImg.addChild(menuNode); diff --git a/core/src/com/saltosion/gladiator/gui/nodes/ButtonNode.java b/core/src/com/saltosion/gladiator/gui/nodes/ButtonNode.java index 829acb8..528bad8 100644 --- a/core/src/com/saltosion/gladiator/gui/nodes/ButtonNode.java +++ b/core/src/com/saltosion/gladiator/gui/nodes/ButtonNode.java @@ -1,32 +1,49 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.nodes; import com.saltosion.gladiator.gui.properties.ImageProperty; import com.saltosion.gladiator.gui.properties.InteractiveProperty; -import com.saltosion.gladiator.gui.nodes.GUINode; import com.badlogic.gdx.graphics.g2d.Sprite; import com.saltosion.gladiator.util.AppUtil; import com.saltosion.gladiator.util.AudioLoader; import com.saltosion.gladiator.util.Name; public abstract class ButtonNode extends GUINode implements InteractiveProperty, ImageProperty { + private final Sprite onHover; private final Sprite normal; private boolean hovered = false; - + public ButtonNode(String ID, Sprite onHover, Sprite normal) { super(ID); - this.onHover = onHover; + this.onHover = onHover; this.normal = normal; } - + public void playButtonPressSound() { - AppUtil.jukebox.playSound(AudioLoader.getSound(Name.SOUND_BUTTON_PRESS), - AppUtil.sfxVolume/2); + AppUtil.jukebox.playSound(AudioLoader.getSound(Name.SOUND_BUTTON_PRESS), + AppUtil.sfxVolume / 2); } - + public void playButtonReleaseSound() { - AppUtil.jukebox.playSound(AudioLoader.getSound(Name.SOUND_BUTTON_RELEASE), - AppUtil.sfxVolume/2); + AppUtil.jukebox.playSound(AudioLoader.getSound(Name.SOUND_BUTTON_RELEASE), + AppUtil.sfxVolume / 2); } @Override @@ -35,7 +52,7 @@ public abstract class ButtonNode extends GUINode implements InteractiveProperty, } @Override - public void mouseLeave(float x, float y){ + public void mouseLeave(float x, float y) { hovered = false; } diff --git a/core/src/com/saltosion/gladiator/gui/nodes/GUINode.java b/core/src/com/saltosion/gladiator/gui/nodes/GUINode.java index 6cd60b5..ed06f39 100644 --- a/core/src/com/saltosion/gladiator/gui/nodes/GUINode.java +++ b/core/src/com/saltosion/gladiator/gui/nodes/GUINode.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.nodes; import com.badlogic.gdx.math.Vector2; diff --git a/core/src/com/saltosion/gladiator/gui/nodes/ImageNode.java b/core/src/com/saltosion/gladiator/gui/nodes/ImageNode.java index 1d1f19f..b312f31 100644 --- a/core/src/com/saltosion/gladiator/gui/nodes/ImageNode.java +++ b/core/src/com/saltosion/gladiator/gui/nodes/ImageNode.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates diff --git a/core/src/com/saltosion/gladiator/gui/nodes/TextNode.java b/core/src/com/saltosion/gladiator/gui/nodes/TextNode.java index a7d0c28..5c08753 100644 --- a/core/src/com/saltosion/gladiator/gui/nodes/TextNode.java +++ b/core/src/com/saltosion/gladiator/gui/nodes/TextNode.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.nodes; import com.saltosion.gladiator.gui.properties.TextProperty; diff --git a/core/src/com/saltosion/gladiator/gui/properties/ImageProperty.java b/core/src/com/saltosion/gladiator/gui/properties/ImageProperty.java index 312b170..ca1e848 100644 --- a/core/src/com/saltosion/gladiator/gui/properties/ImageProperty.java +++ b/core/src/com/saltosion/gladiator/gui/properties/ImageProperty.java @@ -1,8 +1,25 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.properties; import com.badlogic.gdx.graphics.g2d.Sprite; public interface ImageProperty { - + public Sprite getImage(); } diff --git a/core/src/com/saltosion/gladiator/gui/properties/InteractiveProperty.java b/core/src/com/saltosion/gladiator/gui/properties/InteractiveProperty.java index 8ca07cd..4e54cfd 100644 --- a/core/src/com/saltosion/gladiator/gui/properties/InteractiveProperty.java +++ b/core/src/com/saltosion/gladiator/gui/properties/InteractiveProperty.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.properties; public interface InteractiveProperty { diff --git a/core/src/com/saltosion/gladiator/gui/properties/TextProperty.java b/core/src/com/saltosion/gladiator/gui/properties/TextProperty.java index fcb4339..dc165b7 100644 --- a/core/src/com/saltosion/gladiator/gui/properties/TextProperty.java +++ b/core/src/com/saltosion/gladiator/gui/properties/TextProperty.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.gui.properties; public interface TextProperty { diff --git a/core/src/com/saltosion/gladiator/input/IRDebugToggle.java b/core/src/com/saltosion/gladiator/input/IRDebugToggle.java index e4410c4..7a15a93 100644 --- a/core/src/com/saltosion/gladiator/input/IRDebugToggle.java +++ b/core/src/com/saltosion/gladiator/input/IRDebugToggle.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.input; import com.saltosion.gladiator.systems.RenderingSystem; diff --git a/core/src/com/saltosion/gladiator/input/IRJump.java b/core/src/com/saltosion/gladiator/input/IRJump.java index 9b06737..857e992 100644 --- a/core/src/com/saltosion/gladiator/input/IRJump.java +++ b/core/src/com/saltosion/gladiator/input/IRJump.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.input; import com.saltosion.gladiator.components.CPhysics; @@ -5,18 +22,18 @@ import com.saltosion.gladiator.util.AppUtil; public class IRJump implements InputReceiver { - @Override - public boolean pressed() { - CPhysics physics = AppUtil.player.getComponent(CPhysics.class); - physics.jumping = true; - return true; - } + @Override + public boolean pressed() { + CPhysics physics = AppUtil.player.getComponent(CPhysics.class); + physics.jumping = true; + return true; + } - @Override - public boolean released() { - CPhysics physics = AppUtil.player.getComponent(CPhysics.class); - physics.jumping = false; - return true; - } + @Override + public boolean released() { + CPhysics physics = AppUtil.player.getComponent(CPhysics.class); + physics.jumping = false; + return true; + } } diff --git a/core/src/com/saltosion/gladiator/input/IRMoveLeft.java b/core/src/com/saltosion/gladiator/input/IRMoveLeft.java index c81af6b..c7aff40 100644 --- a/core/src/com/saltosion/gladiator/input/IRMoveLeft.java +++ b/core/src/com/saltosion/gladiator/input/IRMoveLeft.java @@ -1,7 +1,22 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.input; -import com.badlogic.ashley.core.Family; -import com.badlogic.gdx.math.Vector2; import com.saltosion.gladiator.components.CPhysics; import com.saltosion.gladiator.util.AppUtil; diff --git a/core/src/com/saltosion/gladiator/input/IRMoveRight.java b/core/src/com/saltosion/gladiator/input/IRMoveRight.java index 0bf02ff..935a45e 100644 --- a/core/src/com/saltosion/gladiator/input/IRMoveRight.java +++ b/core/src/com/saltosion/gladiator/input/IRMoveRight.java @@ -1,7 +1,22 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.input; -import com.badlogic.ashley.core.Family; -import com.badlogic.gdx.math.Vector2; import com.saltosion.gladiator.components.CPhysics; import com.saltosion.gladiator.util.AppUtil; diff --git a/core/src/com/saltosion/gladiator/input/IRSwing.java b/core/src/com/saltosion/gladiator/input/IRSwing.java index 43e6116..e9aa5a1 100644 --- a/core/src/com/saltosion/gladiator/input/IRSwing.java +++ b/core/src/com/saltosion/gladiator/input/IRSwing.java @@ -1,14 +1,30 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.input; import com.saltosion.gladiator.components.CCombat; import com.saltosion.gladiator.util.AppUtil; import com.saltosion.gladiator.util.Direction; -import com.saltosion.gladiator.util.Global; public class IRSwing implements InputReceiver { - - private Direction dir; - + + private final Direction dir; + public IRSwing(Direction dir) { this.dir = dir; } diff --git a/core/src/com/saltosion/gladiator/input/InputHandler.java b/core/src/com/saltosion/gladiator/input/InputHandler.java index ec0b1ca..9bdcd59 100644 --- a/core/src/com/saltosion/gladiator/input/InputHandler.java +++ b/core/src/com/saltosion/gladiator/input/InputHandler.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.input; import java.util.HashMap; @@ -32,12 +49,12 @@ public class InputHandler implements InputProcessor { addInput(Keys.DOWN, Name.SWING_DOWN, false); addInput(Keys.F2, Name.DEBUG, false); } - + private void addInput(int key, String action, boolean activated) { keys.put(key, action); activatedInputs.put(action, activated); } - + public void setInputEnabled(String action, boolean enabled) { activatedInputs.put(action, enabled); } @@ -46,7 +63,10 @@ public class InputHandler implements InputProcessor { public boolean keyDown(int keycode) { if (!keys.containsKey(keycode)) { return false; - } if (!activatedInputs.get(keys.get(keycode))) { return false; } + } + if (!activatedInputs.get(keys.get(keycode))) { + return false; + } String actionName = keys.get(keycode); return InputReceivers.getReceiver(actionName).pressed(); } @@ -55,7 +75,10 @@ public class InputHandler implements InputProcessor { public boolean keyUp(int keycode) { if (!keys.containsKey(keycode)) { return false; - } if (!activatedInputs.get(keys.get(keycode))) { return false; } + } + if (!activatedInputs.get(keys.get(keycode))) { + return false; + } String actionName = keys.get(keycode); return InputReceivers.getReceiver(actionName).released(); } diff --git a/core/src/com/saltosion/gladiator/input/InputReceiver.java b/core/src/com/saltosion/gladiator/input/InputReceiver.java index a56c5e3..04d27ce 100644 --- a/core/src/com/saltosion/gladiator/input/InputReceiver.java +++ b/core/src/com/saltosion/gladiator/input/InputReceiver.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.input; public interface InputReceiver { diff --git a/core/src/com/saltosion/gladiator/input/InputReceivers.java b/core/src/com/saltosion/gladiator/input/InputReceivers.java index 1541f31..ace0594 100644 --- a/core/src/com/saltosion/gladiator/input/InputReceivers.java +++ b/core/src/com/saltosion/gladiator/input/InputReceivers.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.input; import java.util.HashMap; diff --git a/core/src/com/saltosion/gladiator/level/EntityFactory.java b/core/src/com/saltosion/gladiator/level/EntityFactory.java index b7531da..97cb2ad 100644 --- a/core/src/com/saltosion/gladiator/level/EntityFactory.java +++ b/core/src/com/saltosion/gladiator/level/EntityFactory.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.level; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/level/Level.java b/core/src/com/saltosion/gladiator/level/Level.java index 94a774a..27b58c5 100644 --- a/core/src/com/saltosion/gladiator/level/Level.java +++ b/core/src/com/saltosion/gladiator/level/Level.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.level; public interface Level { diff --git a/core/src/com/saltosion/gladiator/level/LevelFactory.java b/core/src/com/saltosion/gladiator/level/LevelFactory.java index 599a175..faab900 100644 --- a/core/src/com/saltosion/gladiator/level/LevelFactory.java +++ b/core/src/com/saltosion/gladiator/level/LevelFactory.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.level; import com.badlogic.ashley.core.ComponentMapper; diff --git a/core/src/com/saltosion/gladiator/level/premade/Round1Level.java b/core/src/com/saltosion/gladiator/level/premade/Round1Level.java index be57552..b42a8bf 100644 --- a/core/src/com/saltosion/gladiator/level/premade/Round1Level.java +++ b/core/src/com/saltosion/gladiator/level/premade/Round1Level.java @@ -1,10 +1,26 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.level.premade; import com.badlogic.ashley.core.Entity; import com.badlogic.gdx.math.Vector2; import com.saltosion.gladiator.components.CAI; import com.saltosion.gladiator.level.Level; -import com.saltosion.gladiator.listeners.ai.BerserkerAI; import com.saltosion.gladiator.listeners.ai.HeavenWorshiperAI; import com.saltosion.gladiator.util.AppUtil; import com.saltosion.gladiator.util.Direction; diff --git a/core/src/com/saltosion/gladiator/level/premade/Round2Level.java b/core/src/com/saltosion/gladiator/level/premade/Round2Level.java index a4fef3f..ccfcd84 100644 --- a/core/src/com/saltosion/gladiator/level/premade/Round2Level.java +++ b/core/src/com/saltosion/gladiator/level/premade/Round2Level.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.level.premade; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/level/premade/Round3Level.java b/core/src/com/saltosion/gladiator/level/premade/Round3Level.java index 7d65ca7..42ec0c2 100644 --- a/core/src/com/saltosion/gladiator/level/premade/Round3Level.java +++ b/core/src/com/saltosion/gladiator/level/premade/Round3Level.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.level.premade; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/level/premade/Round4Level.java b/core/src/com/saltosion/gladiator/level/premade/Round4Level.java index 305b02f..7b49c50 100644 --- a/core/src/com/saltosion/gladiator/level/premade/Round4Level.java +++ b/core/src/com/saltosion/gladiator/level/premade/Round4Level.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.level.premade; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/level/premade/Round5Level.java b/core/src/com/saltosion/gladiator/level/premade/Round5Level.java index b2804c4..1223fc8 100644 --- a/core/src/com/saltosion/gladiator/level/premade/Round5Level.java +++ b/core/src/com/saltosion/gladiator/level/premade/Round5Level.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.level.premade; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/listeners/AIListener.java b/core/src/com/saltosion/gladiator/listeners/AIListener.java index 4942ea7..7bbfa31 100644 --- a/core/src/com/saltosion/gladiator/listeners/AIListener.java +++ b/core/src/com/saltosion/gladiator/listeners/AIListener.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/listeners/BasicDeathListener.java b/core/src/com/saltosion/gladiator/listeners/BasicDeathListener.java index 07d1126..66ff05b 100644 --- a/core/src/com/saltosion/gladiator/listeners/BasicDeathListener.java +++ b/core/src/com/saltosion/gladiator/listeners/BasicDeathListener.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/listeners/CollisionListener.java b/core/src/com/saltosion/gladiator/listeners/CollisionListener.java index 930629e..f90456a 100644 --- a/core/src/com/saltosion/gladiator/listeners/CollisionListener.java +++ b/core/src/com/saltosion/gladiator/listeners/CollisionListener.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/listeners/CombatListener.java b/core/src/com/saltosion/gladiator/listeners/CombatListener.java index 6c77349..b9a428c 100644 --- a/core/src/com/saltosion/gladiator/listeners/CombatListener.java +++ b/core/src/com/saltosion/gladiator/listeners/CombatListener.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/listeners/SwingHitboxListener.java b/core/src/com/saltosion/gladiator/listeners/SwingHitboxListener.java index 8698a44..e6d6150 100644 --- a/core/src/com/saltosion/gladiator/listeners/SwingHitboxListener.java +++ b/core/src/com/saltosion/gladiator/listeners/SwingHitboxListener.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners; import java.util.ArrayList; @@ -50,7 +67,7 @@ public class SwingHitboxListener implements CollisionListener { } float force = cm.get(source).getSwingForce(); pm.get(source).setSimVelocity(x * force, 0); - + Sound s = AppUtil.jukebox.returnRandomSound(AudioLoader.getSound(Name.SOUND_CLANG01), AudioLoader.getSound(Name.SOUND_CLANG02), AudioLoader.getSound(Name.SOUND_CLANG03), diff --git a/core/src/com/saltosion/gladiator/listeners/ai/BerserkerAI.java b/core/src/com/saltosion/gladiator/listeners/ai/BerserkerAI.java index 52c15d1..c0e9048 100644 --- a/core/src/com/saltosion/gladiator/listeners/ai/BerserkerAI.java +++ b/core/src/com/saltosion/gladiator/listeners/ai/BerserkerAI.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners.ai; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/listeners/ai/DummyAI.java b/core/src/com/saltosion/gladiator/listeners/ai/DummyAI.java index 5f054d4..a50a85a 100644 --- a/core/src/com/saltosion/gladiator/listeners/ai/DummyAI.java +++ b/core/src/com/saltosion/gladiator/listeners/ai/DummyAI.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners.ai; import com.badlogic.ashley.core.ComponentMapper; diff --git a/core/src/com/saltosion/gladiator/listeners/ai/HeavenWorshiperAI.java b/core/src/com/saltosion/gladiator/listeners/ai/HeavenWorshiperAI.java index ba8cbc1..c75b567 100644 --- a/core/src/com/saltosion/gladiator/listeners/ai/HeavenWorshiperAI.java +++ b/core/src/com/saltosion/gladiator/listeners/ai/HeavenWorshiperAI.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners.ai; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/listeners/ai/HunterAI.java b/core/src/com/saltosion/gladiator/listeners/ai/HunterAI.java index d8a99dd..33c9af5 100644 --- a/core/src/com/saltosion/gladiator/listeners/ai/HunterAI.java +++ b/core/src/com/saltosion/gladiator/listeners/ai/HunterAI.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners.ai; import com.badlogic.ashley.core.ComponentMapper; diff --git a/core/src/com/saltosion/gladiator/listeners/ai/PanicAI.java b/core/src/com/saltosion/gladiator/listeners/ai/PanicAI.java index c4de3c2..c8c4824 100644 --- a/core/src/com/saltosion/gladiator/listeners/ai/PanicAI.java +++ b/core/src/com/saltosion/gladiator/listeners/ai/PanicAI.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners.ai; import com.badlogic.ashley.core.Entity; diff --git a/core/src/com/saltosion/gladiator/listeners/ai/ScaredAI.java b/core/src/com/saltosion/gladiator/listeners/ai/ScaredAI.java index 4f52575..198c3a6 100644 --- a/core/src/com/saltosion/gladiator/listeners/ai/ScaredAI.java +++ b/core/src/com/saltosion/gladiator/listeners/ai/ScaredAI.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.listeners.ai; import com.badlogic.ashley.core.ComponentMapper; diff --git a/core/src/com/saltosion/gladiator/state/BaseState.java b/core/src/com/saltosion/gladiator/state/BaseState.java index c2007b5..d7f8a39 100644 --- a/core/src/com/saltosion/gladiator/state/BaseState.java +++ b/core/src/com/saltosion/gladiator/state/BaseState.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.state; import com.saltosion.gladiator.GladiatorBrawler; diff --git a/core/src/com/saltosion/gladiator/state/GameOverState.java b/core/src/com/saltosion/gladiator/state/GameOverState.java index e9df72f..4f5a043 100644 --- a/core/src/com/saltosion/gladiator/state/GameOverState.java +++ b/core/src/com/saltosion/gladiator/state/GameOverState.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.state; import com.saltosion.gladiator.gui.creators.GameOverGUICreator; diff --git a/core/src/com/saltosion/gladiator/state/InGameState.java b/core/src/com/saltosion/gladiator/state/InGameState.java index 3d5c3c6..a8fedc6 100644 --- a/core/src/com/saltosion/gladiator/state/InGameState.java +++ b/core/src/com/saltosion/gladiator/state/InGameState.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.state; import com.saltosion.gladiator.gui.creators.InGameGUICreator; diff --git a/core/src/com/saltosion/gladiator/state/IntroState.java b/core/src/com/saltosion/gladiator/state/IntroState.java index ddb1770..fd037ff 100644 --- a/core/src/com/saltosion/gladiator/state/IntroState.java +++ b/core/src/com/saltosion/gladiator/state/IntroState.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.state; import com.saltosion.gladiator.gui.creators.IntroGUICreator; diff --git a/core/src/com/saltosion/gladiator/state/MainMenuState.java b/core/src/com/saltosion/gladiator/state/MainMenuState.java index f7e6c27..a295965 100644 --- a/core/src/com/saltosion/gladiator/state/MainMenuState.java +++ b/core/src/com/saltosion/gladiator/state/MainMenuState.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.state; import com.saltosion.gladiator.gui.creators.MainMenuGUICreator; @@ -14,7 +31,7 @@ public class MainMenuState extends BaseState { // Play music AppUtil.jukebox.playMusic(AudioLoader.getMusic(Name.MUSIC_THEME)); AppUtil.jukebox.setMusicVolume(AppUtil.musicVolume); - + // Start from a clean slate AppUtil.guiManager.clearGUI(); diff --git a/core/src/com/saltosion/gladiator/state/WinState.java b/core/src/com/saltosion/gladiator/state/WinState.java index aadb266..241419d 100644 --- a/core/src/com/saltosion/gladiator/state/WinState.java +++ b/core/src/com/saltosion/gladiator/state/WinState.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.state; import com.saltosion.gladiator.gui.creators.WinGUICreator; diff --git a/core/src/com/saltosion/gladiator/systems/AISystem.java b/core/src/com/saltosion/gladiator/systems/AISystem.java index 4bc046f..6833863 100644 --- a/core/src/com/saltosion/gladiator/systems/AISystem.java +++ b/core/src/com/saltosion/gladiator/systems/AISystem.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.systems; import com.badlogic.ashley.core.ComponentMapper; diff --git a/core/src/com/saltosion/gladiator/systems/CombatSystem.java b/core/src/com/saltosion/gladiator/systems/CombatSystem.java index c3fbc82..5c5de3d 100644 --- a/core/src/com/saltosion/gladiator/systems/CombatSystem.java +++ b/core/src/com/saltosion/gladiator/systems/CombatSystem.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.systems; import com.badlogic.ashley.core.ComponentMapper; diff --git a/core/src/com/saltosion/gladiator/systems/MiscManagerSystem.java b/core/src/com/saltosion/gladiator/systems/MiscManagerSystem.java index 910eb79..f03d4b0 100644 --- a/core/src/com/saltosion/gladiator/systems/MiscManagerSystem.java +++ b/core/src/com/saltosion/gladiator/systems/MiscManagerSystem.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.systems; import com.badlogic.ashley.core.ComponentMapper; @@ -13,18 +30,18 @@ public class MiscManagerSystem extends EntitySystem { private ComponentMapper dm = ComponentMapper.getFor(CDestructive.class); private ImmutableArray entities; - + @Override public void addedToEngine(Engine engine) { updateEntities(engine); } - + @Override public void update(float deltaTime) { - for (int i=0; i 0) { des.timeLeft -= deltaTime; } else { @@ -32,7 +49,7 @@ public class MiscManagerSystem extends EntitySystem { } } } - + public void updateEntities(Engine engine) { entities = engine.getEntitiesFor(Family.getFor(CDestructive.class)); } diff --git a/core/src/com/saltosion/gladiator/systems/ParticleSystem.java b/core/src/com/saltosion/gladiator/systems/ParticleSystem.java index 3be7561..9a7859c 100644 --- a/core/src/com/saltosion/gladiator/systems/ParticleSystem.java +++ b/core/src/com/saltosion/gladiator/systems/ParticleSystem.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.systems; import com.badlogic.ashley.core.ComponentMapper; diff --git a/core/src/com/saltosion/gladiator/systems/PhysicsSystem.java b/core/src/com/saltosion/gladiator/systems/PhysicsSystem.java index 26f31a5..ed73984 100644 --- a/core/src/com/saltosion/gladiator/systems/PhysicsSystem.java +++ b/core/src/com/saltosion/gladiator/systems/PhysicsSystem.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.systems; import com.badlogic.ashley.core.ComponentMapper; @@ -61,7 +78,7 @@ public class PhysicsSystem extends EntitySystem { if (obj.jumping && obj.isGrounded()) { obj.setGrounded(false); obj.getVelocity().y = obj.getJumpForce(); - + // Sound effect! AppUtil.jukebox.playSound(AudioLoader.getSound(Name.SOUND_STEP), AppUtil.sfxVolume); } diff --git a/core/src/com/saltosion/gladiator/systems/RenderingSystem.java b/core/src/com/saltosion/gladiator/systems/RenderingSystem.java index 8216231..f0fad48 100644 --- a/core/src/com/saltosion/gladiator/systems/RenderingSystem.java +++ b/core/src/com/saltosion/gladiator/systems/RenderingSystem.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.systems; import com.badlogic.ashley.core.ComponentMapper; @@ -189,7 +206,7 @@ public class RenderingSystem extends EntitySystem { if (po.stepCD > 0) { po.stepCD -= deltaTime; } - + if (moving && combat) { ro.playAnimation("torso", "Torso-Combat-" + dirSwing); ro.playAnimation("legs", "Legs-Run-" + dirMove); @@ -206,13 +223,13 @@ public class RenderingSystem extends EntitySystem { ro.playAnimation("legs", "Legs-Idle-" + dirMove); } } - + private void tryToMakeStepSound(CPhysics po) { if (po.stepCD > 0 || !po.isGrounded()) { return; } po.stepCD = 0.3f; - AppUtil.jukebox.playSound(AudioLoader.getSound(Name.SOUND_STEP), AppUtil.sfxVolume/3*2); + AppUtil.jukebox.playSound(AudioLoader.getSound(Name.SOUND_STEP), AppUtil.sfxVolume / 3 * 2); } private void renderEntities(float deltaTime) { diff --git a/core/src/com/saltosion/gladiator/util/AppUtil.java b/core/src/com/saltosion/gladiator/util/AppUtil.java index e7a5a36..d222cf5 100644 --- a/core/src/com/saltosion/gladiator/util/AppUtil.java +++ b/core/src/com/saltosion/gladiator/util/AppUtil.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; import com.badlogic.ashley.core.Engine; @@ -19,7 +36,7 @@ public class AppUtil { public static InputHandler inputHandler; public static final int VPHEIGHT_CONST = 24; - + public static float sfxVolume = 0.3f; public static float musicVolume = 0.7f; diff --git a/core/src/com/saltosion/gladiator/util/AudioLoader.java b/core/src/com/saltosion/gladiator/util/AudioLoader.java index c87561b..ac5480b 100644 --- a/core/src/com/saltosion/gladiator/util/AudioLoader.java +++ b/core/src/com/saltosion/gladiator/util/AudioLoader.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; import com.badlogic.gdx.Gdx; @@ -6,10 +23,10 @@ import com.badlogic.gdx.audio.Sound; import java.util.HashMap; public class AudioLoader { - - private static HashMap sounds = new HashMap(); - private static HashMap musics = new HashMap(); - + + private static final HashMap sounds = new HashMap(); + private static final HashMap musics = new HashMap(); + static { // Import all the sounds & musix AudioLoader.musics.put(Name.MUSIC_THEME, loadMusic("audio/theme.ogg")); @@ -30,23 +47,23 @@ public class AudioLoader { AudioLoader.sounds.put(Name.SOUND_BUTTON_PRESS, loadSound("audio/button_press.ogg")); AudioLoader.sounds.put(Name.SOUND_BUTTON_RELEASE, loadSound("audio/button_release.ogg")); } - + private static Music loadMusic(String path) { return Gdx.audio.newMusic(Gdx.files.internal(path)); } - + private static Sound loadSound(String path) { return Gdx.audio.newSound(Gdx.files.internal(path)); } - + public static Sound getSound(String id) { return sounds.get(id); } - + public static Music getMusic(String id) { return musics.get(id); } - + public static void dispose() { Log.info("Disposed sounds and musics!"); for (String s : sounds.keySet()) { @@ -56,5 +73,5 @@ public class AudioLoader { musics.get(s).dispose(); } } - + } diff --git a/core/src/com/saltosion/gladiator/util/Direction.java b/core/src/com/saltosion/gladiator/util/Direction.java index 54375d7..164593a 100644 --- a/core/src/com/saltosion/gladiator/util/Direction.java +++ b/core/src/com/saltosion/gladiator/util/Direction.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; public enum Direction { diff --git a/core/src/com/saltosion/gladiator/util/Global.java b/core/src/com/saltosion/gladiator/util/Global.java index 5b3e1e7..c0a57f6 100644 --- a/core/src/com/saltosion/gladiator/util/Global.java +++ b/core/src/com/saltosion/gladiator/util/Global.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; public class Global { diff --git a/core/src/com/saltosion/gladiator/util/Jukebox.java b/core/src/com/saltosion/gladiator/util/Jukebox.java index d4dc4eb..67f7cf9 100644 --- a/core/src/com/saltosion/gladiator/util/Jukebox.java +++ b/core/src/com/saltosion/gladiator/util/Jukebox.java @@ -1,16 +1,33 @@ - +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.audio.Sound; public class Jukebox { - + private Music currentMusic; private float volume = 1; - + /** * Plays the musix like a baws. + * * @param music * @return boolean if the musix failed to play */ @@ -21,35 +38,42 @@ public class Jukebox { } if (music.equals(currentMusic)) { return false; - } if (currentMusic != null) { currentMusic.stop(); }; + } + if (currentMusic != null) { + currentMusic.stop(); + }; music.play(); music.setVolume(volume); music.setLooping(true); currentMusic = music; return true; } - + public Music getCurrentMusic() { return this.currentMusic; } - + public void setMusicVolume(float volume) { this.volume = volume; - if (currentMusic == null) {return;} + if (currentMusic == null) { + return; + } this.currentMusic.setVolume(volume); } - + /** * Simply plays the sound + * * @param sound * @return long returns sound's id */ public long playSound(Sound sound) { return sound.play(); } - + /** * Play sound and set it's volume + * * @param sound * @param volume 0-1f * @return long returns sound's id @@ -59,9 +83,10 @@ public class Jukebox { sound.setVolume(id, volume); return id; } - + /** * Play sound and set it's volume & pan + * * @param sound * @param volume 0-1f * @param pan ? @@ -72,8 +97,8 @@ public class Jukebox { sound.setPan(id, pan, volume); return id; } - - public Sound returnRandomSound(Sound ... args) { - return args[(int) Math.floor(Math.random()*args.length)]; + + public Sound returnRandomSound(Sound... args) { + return args[(int) Math.floor(Math.random() * args.length)]; } } diff --git a/core/src/com/saltosion/gladiator/util/Log.java b/core/src/com/saltosion/gladiator/util/Log.java index f5c32da..91fe79a 100644 --- a/core/src/com/saltosion/gladiator/util/Log.java +++ b/core/src/com/saltosion/gladiator/util/Log.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; import java.io.BufferedWriter; @@ -5,7 +22,6 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; -import java.io.Writer; import java.util.Calendar; /** diff --git a/core/src/com/saltosion/gladiator/util/Name.java b/core/src/com/saltosion/gladiator/util/Name.java index 068cdf2..46c541d 100644 --- a/core/src/com/saltosion/gladiator/util/Name.java +++ b/core/src/com/saltosion/gladiator/util/Name.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; public class Name { diff --git a/core/src/com/saltosion/gladiator/util/SpriteLoader.java b/core/src/com/saltosion/gladiator/util/SpriteLoader.java index 5449ccc..511978c 100644 --- a/core/src/com/saltosion/gladiator/util/SpriteLoader.java +++ b/core/src/com/saltosion/gladiator/util/SpriteLoader.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; import java.util.HashMap; diff --git a/core/src/com/saltosion/gladiator/util/SpriteSequence.java b/core/src/com/saltosion/gladiator/util/SpriteSequence.java index 31bd42d..126ec2f 100644 --- a/core/src/com/saltosion/gladiator/util/SpriteSequence.java +++ b/core/src/com/saltosion/gladiator/util/SpriteSequence.java @@ -1,3 +1,20 @@ +/** + * GladiatorBrawler is a 2D swordfighting game. + * Copyright (C) 2015 Jeasonfire/Allexit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package com.saltosion.gladiator.util; import java.util.ArrayList; @@ -6,37 +23,37 @@ import com.badlogic.gdx.graphics.g2d.Sprite; public class SpriteSequence { - private final ArrayList sprites = new ArrayList(); - private float defaultPlayspeed = 1; + private final ArrayList sprites = new ArrayList(); + private float defaultPlayspeed = 1; - /** - * A static single image. - * - * @param sprite - */ - public SpriteSequence(Sprite sprite) { - sprites.add(sprite); - defaultPlayspeed = 0; - } + /** + * A static single image. + * + * @param sprite + */ + public SpriteSequence(Sprite sprite) { + sprites.add(sprite); + defaultPlayspeed = 0; + } - public SpriteSequence(float playspeed) { - this.defaultPlayspeed = playspeed; - } + public SpriteSequence(float playspeed) { + this.defaultPlayspeed = playspeed; + } - public SpriteSequence addSprite(Sprite s) { - sprites.add(s); - return this; - } + public SpriteSequence addSprite(Sprite s) { + sprites.add(s); + return this; + } - public Sprite getSprite(int index) { - return sprites.get(index); - } + public Sprite getSprite(int index) { + return sprites.get(index); + } - public float getPlayspeed() { - return defaultPlayspeed; - } + public float getPlayspeed() { + return defaultPlayspeed; + } - public int frameCount() { - return sprites.size(); - } + public int frameCount() { + return sprites.size(); + } }