Skip to content

Commit

Permalink
Fixing code smells in all animation controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniSoda17 committed Oct 16, 2023
1 parent d206e3e commit 75e3b13
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.services.ServiceLocator;

import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
* of the events is triggered.
*/
public class ArcaneArcherAnimationController extends Component {
// // For on collision sounds later
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);

AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

private static final String ATTACK_SOUND = "sounds/mobs/archerArrow.mp3";
Sound attackSound = ServiceLocator.getResourceService().getAsset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.services.ServiceLocator;

import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
* of the events is triggered.
*/
public class CoatAnimationController extends Component {
// // For on collision sounds later
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

private static final String ATTACK_SOUND = "sounds/mobs/coatAttack.mp3";
Sound attackSound = ServiceLocator.getResourceService().getAsset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@

import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
* of the events is triggered.
*/
public class DragonKnightAnimationController extends Component {
// // For on collision sounds later
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

@Override
public void create() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.services.ServiceLocator;
import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
* of the events is triggered.
*/
public class FireWormAnimationController extends Component {
// // For on collision sounds later
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

private static final String ATTACK_SOUND = "sounds/mobs/fireWormRoar.mp3";
Sound attackSound = ServiceLocator.getResourceService().getAsset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;

import java.security.SecureRandom;

public class FirewizardAnimationController extends Component {

AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();


@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;

import java.security.SecureRandom;

public class NecromancerAnimationController extends Component {

AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();


@Override
public void create() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
Expand All @@ -13,9 +12,7 @@ public class NightBorneAnimationController extends Component {
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

AnimationRenderComponent animator;

@Override
public void create() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;

import java.security.SecureRandom;

public class RockyAnimationController extends Component {
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();


@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.services.ServiceLocator;
import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
* of the events is triggered.
*/
public class SkeletonAnimationController extends Component {
// // For on collision sounds later
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

/** Sound variables */
private static final String ATTACK_SOUND = "sounds/mobs/boneBreak.mp3";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.services.ServiceLocator;
import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
* of the events is triggered.
*/
public class WaterQueenAnimationController extends Component {
// // For on collision sounds later
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

private static final String ATTACK_SOUND = "sounds/mobs/waterQueenSpell.mp3";
Sound attackSound = ServiceLocator.getResourceService().getAsset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@

import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
* of the events is triggered.
*/
public class WaterSlimeAnimationController extends Component {
// // For on collision sounds later
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

@Override
public void create() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.services.ServiceLocator;
import java.security.SecureRandom;

/**
* This class listens to events relevant to a ghost entity's state and plays the animation when one
* of the events is triggered.
*/
public class WizardAnimationController extends Component {
// // For on collision sounds later
// private static final String COLLISION_SFX = "sounds/projectiles/on_collision.mp3";
// Sound onCollisionSound = ServiceLocator.getResourceService().getAsset(
// COLLISION_SFX, Sound.class);
AnimationRenderComponent animator;
private SecureRandom rand = new SecureRandom();

/** Sound variables */
private static final String ATTACK_SOUND = "sounds/mobs/wizardSpell.mp3";
Expand Down

0 comments on commit 75e3b13

Please sign in to comment.