1b: inline static fields
This commit is contained in:
parent
5ec9fa6e18
commit
ab04dc1fd8
@ -10,30 +10,10 @@ package fr.enssat.BoulderDash.models.displayableElement;
|
|||||||
* @since 2015-06-19
|
* @since 2015-06-19
|
||||||
*/
|
*/
|
||||||
public class BoulderModel extends DisplayableElementModel {
|
public class BoulderModel extends DisplayableElementModel {
|
||||||
private static String spriteName;
|
|
||||||
private static boolean isDestructible;
|
|
||||||
private static boolean canMove;
|
|
||||||
private static boolean impactExplosive;
|
|
||||||
private static boolean animate;
|
|
||||||
private static int priority;
|
|
||||||
private static String collideSound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static dataset
|
|
||||||
* Specifies the physical parameters of the object
|
|
||||||
*/
|
|
||||||
static {
|
|
||||||
spriteName = "boulder";
|
|
||||||
isDestructible = false;
|
|
||||||
canMove = true;
|
|
||||||
impactExplosive = false;
|
|
||||||
animate = true;
|
|
||||||
priority = 2;
|
|
||||||
collideSound = "die";
|
|
||||||
}
|
|
||||||
|
|
||||||
BoulderModel(boolean convertible) {
|
BoulderModel(boolean convertible) {
|
||||||
super(isDestructible, canMove, spriteName, priority, impactExplosive, animate, false, collideSound, convertible);
|
super(false, true, "boulder",
|
||||||
this.loadSprite(spriteName);
|
2, false, true,
|
||||||
|
false, "die", convertible);
|
||||||
|
this.loadSprite("boulder");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,32 +10,10 @@ package fr.enssat.BoulderDash.models.displayableElement;
|
|||||||
* @since 2015-06-19
|
* @since 2015-06-19
|
||||||
*/
|
*/
|
||||||
public class BrickWallModel extends DisplayableElementModel {
|
public class BrickWallModel extends DisplayableElementModel {
|
||||||
private static String spriteName;
|
|
||||||
private static boolean isDestructible;
|
|
||||||
private static boolean canMove;
|
|
||||||
private static boolean impactExplosive;
|
|
||||||
private static boolean animate;
|
|
||||||
private static int priority;
|
|
||||||
private static boolean falling;
|
|
||||||
private static String collideSound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static dataset
|
|
||||||
* Specifies the physical parameters of the object
|
|
||||||
*/
|
|
||||||
static {
|
|
||||||
spriteName = "brickwall";
|
|
||||||
isDestructible = true;
|
|
||||||
canMove = false;
|
|
||||||
impactExplosive = false;
|
|
||||||
animate = false;
|
|
||||||
priority = 3;
|
|
||||||
falling = false;
|
|
||||||
collideSound = "touch";
|
|
||||||
}
|
|
||||||
|
|
||||||
BrickWallModel() {
|
BrickWallModel() {
|
||||||
super(isDestructible, canMove, spriteName, priority, impactExplosive, animate, falling, collideSound);
|
super(true, false, "brickwall",
|
||||||
this.loadSprite(spriteName);
|
3, false, false,
|
||||||
|
false, "touch");
|
||||||
|
this.loadSprite("brickwall");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,33 +10,11 @@ package fr.enssat.BoulderDash.models.displayableElement;
|
|||||||
* @since 2015-06-22
|
* @since 2015-06-22
|
||||||
*/
|
*/
|
||||||
public class CursorModel extends DisplayableElementModel {
|
public class CursorModel extends DisplayableElementModel {
|
||||||
private static String spriteName;
|
|
||||||
private static boolean isDestructible;
|
|
||||||
private static boolean canMove;
|
|
||||||
private static boolean impactExplosive;
|
|
||||||
private static boolean animate;
|
|
||||||
private static int priority;
|
|
||||||
private static boolean falling;
|
|
||||||
private static String collideSound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static dataset
|
|
||||||
* Specifies the physical parameters of the object
|
|
||||||
*/
|
|
||||||
static {
|
|
||||||
spriteName = "cursor";
|
|
||||||
isDestructible = false;
|
|
||||||
canMove = false;
|
|
||||||
impactExplosive = false;
|
|
||||||
animate = false;
|
|
||||||
priority = 0;
|
|
||||||
falling = false;
|
|
||||||
collideSound = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
CursorModel() {
|
CursorModel() {
|
||||||
super(isDestructible, canMove, spriteName, priority, impactExplosive, animate, falling, collideSound);
|
super(false, false, "cursor",
|
||||||
|
0, false, false,
|
||||||
|
false, null);
|
||||||
|
|
||||||
this.loadSprite(spriteName);
|
this.loadSprite("cursor");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,36 +10,11 @@ package fr.enssat.BoulderDash.models.displayableElement;
|
|||||||
* @since 2015-06-19
|
* @since 2015-06-19
|
||||||
*/
|
*/
|
||||||
public class DirtModel extends DisplayableElementModel {
|
public class DirtModel extends DisplayableElementModel {
|
||||||
private static String spriteName;
|
|
||||||
private static boolean isDestructible;
|
|
||||||
private static boolean canMove;
|
|
||||||
private static boolean impactExplosive;
|
|
||||||
private static boolean animate;
|
|
||||||
private static int priority;
|
|
||||||
private static boolean falling;
|
|
||||||
private static String collideSound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static dataset
|
|
||||||
* Specifies the physical parameters of the object
|
|
||||||
*/
|
|
||||||
static {
|
|
||||||
spriteName = "dirt";
|
|
||||||
isDestructible = true;
|
|
||||||
canMove = false;
|
|
||||||
impactExplosive = false;
|
|
||||||
animate = false;
|
|
||||||
priority = 0;
|
|
||||||
falling = false;
|
|
||||||
collideSound = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor
|
|
||||||
*/
|
|
||||||
DirtModel() {
|
DirtModel() {
|
||||||
super(isDestructible, canMove, spriteName, priority, impactExplosive, animate, falling, collideSound);
|
super(true, false,
|
||||||
|
"dirt", 0, false,
|
||||||
|
false, false, null);
|
||||||
|
|
||||||
this.loadSprite(spriteName);
|
this.loadSprite("dirt");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,33 +10,11 @@ package fr.enssat.BoulderDash.models.displayableElement;
|
|||||||
* @since 2015-06-19
|
* @since 2015-06-19
|
||||||
*/
|
*/
|
||||||
public class DoorModel extends DisplayableElementModel {
|
public class DoorModel extends DisplayableElementModel {
|
||||||
private static String spriteName;
|
|
||||||
private static boolean isDestructible;
|
|
||||||
private static boolean canMove;
|
|
||||||
private static boolean impactExplosive;
|
|
||||||
private static boolean animate;
|
|
||||||
private static int priority;
|
|
||||||
private static boolean falling;
|
|
||||||
private static String collideSound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static dataset
|
|
||||||
* Specifies the physical parameters of the object
|
|
||||||
*/
|
|
||||||
static {
|
|
||||||
spriteName = "door";
|
|
||||||
isDestructible = false;
|
|
||||||
canMove = false;
|
|
||||||
impactExplosive = false;
|
|
||||||
animate = false;
|
|
||||||
priority = 0;
|
|
||||||
falling = false;
|
|
||||||
collideSound = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
DoorModel() {
|
DoorModel() {
|
||||||
super(isDestructible, canMove, spriteName, priority, impactExplosive, animate, falling, collideSound);
|
super(false, false, "door",
|
||||||
|
0, false, false,
|
||||||
|
false, null);
|
||||||
|
|
||||||
this.loadSprite(spriteName);
|
this.loadSprite("door");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,33 +10,11 @@ package fr.enssat.BoulderDash.models.displayableElement;
|
|||||||
* @since 2015-06-19
|
* @since 2015-06-19
|
||||||
*/
|
*/
|
||||||
public class EmptyModel extends DisplayableElementModel {
|
public class EmptyModel extends DisplayableElementModel {
|
||||||
private static String spriteName;
|
|
||||||
private static boolean isDestructible;
|
|
||||||
private static boolean canMove;
|
|
||||||
private static boolean impactExplosive;
|
|
||||||
private static boolean animate;
|
|
||||||
private static int priority;
|
|
||||||
private static boolean falling;
|
|
||||||
private static String collideSound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static dataset
|
|
||||||
* Specifies the physical parameters of the object
|
|
||||||
*/
|
|
||||||
static {
|
|
||||||
spriteName = "black";
|
|
||||||
isDestructible = false;
|
|
||||||
canMove = false;
|
|
||||||
impactExplosive = false;
|
|
||||||
animate = false;
|
|
||||||
priority = 0;
|
|
||||||
falling = false;
|
|
||||||
collideSound = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
EmptyModel() {
|
EmptyModel() {
|
||||||
super(isDestructible, canMove, spriteName, priority, impactExplosive, animate, falling, collideSound);
|
super(false, false, "black",
|
||||||
|
0, false, false,
|
||||||
|
false, null);
|
||||||
|
|
||||||
this.loadSprite(spriteName);
|
this.loadSprite("black");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,32 +10,10 @@ package fr.enssat.BoulderDash.models.displayableElement;
|
|||||||
* @since 2015-06-19
|
* @since 2015-06-19
|
||||||
*/
|
*/
|
||||||
public class ExpandingWallModel extends DisplayableElementModel {
|
public class ExpandingWallModel extends DisplayableElementModel {
|
||||||
private static String spriteName;
|
|
||||||
private static boolean destructible;
|
|
||||||
private static boolean canMove;
|
|
||||||
private static boolean impactExplosive;
|
|
||||||
private static boolean animate;
|
|
||||||
private static int priority;
|
|
||||||
private static boolean falling;
|
|
||||||
private static String collideSound;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Static dataset
|
|
||||||
* Specifies the physical parameters of the object
|
|
||||||
*/
|
|
||||||
static {
|
|
||||||
spriteName = "expandingwall";
|
|
||||||
destructible = false;
|
|
||||||
canMove = false;
|
|
||||||
impactExplosive = false;
|
|
||||||
animate = false;
|
|
||||||
priority = 10;
|
|
||||||
falling = false;
|
|
||||||
collideSound = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
ExpandingWallModel() {
|
ExpandingWallModel() {
|
||||||
super(destructible, canMove, spriteName, priority, impactExplosive, animate, falling, collideSound);
|
super(false, false, "expandingwall",
|
||||||
this.loadSprite(spriteName);
|
10, false, false,
|
||||||
|
false, null);
|
||||||
|
this.loadSprite("expandingwall");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,32 +10,10 @@ package fr.enssat.BoulderDash.models.displayableElement;
|
|||||||
* @since 2015-06-19
|
* @since 2015-06-19
|
||||||
*/
|
*/
|
||||||
public class SteelWallModel extends DisplayableElementModel {
|
public class SteelWallModel extends DisplayableElementModel {
|
||||||
private static String spriteName;
|
|
||||||
private static boolean isDestructible;
|
|
||||||
private static boolean canMove;
|
|
||||||
private static boolean impactExplosive;
|
|
||||||
private static boolean animate;
|
|
||||||
private static int priority;
|
|
||||||
private static boolean falling;
|
|
||||||
private static String collideSound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static dataset
|
|
||||||
* Specifies the physical parameters of the object
|
|
||||||
*/
|
|
||||||
static {
|
|
||||||
spriteName = "steelwall";
|
|
||||||
isDestructible = false;
|
|
||||||
canMove = false;
|
|
||||||
impactExplosive = false;
|
|
||||||
animate = false;
|
|
||||||
priority = 3;
|
|
||||||
falling = false;
|
|
||||||
collideSound = "touch";
|
|
||||||
}
|
|
||||||
|
|
||||||
SteelWallModel() {
|
SteelWallModel() {
|
||||||
super(isDestructible, canMove, spriteName, priority, impactExplosive, animate, falling, collideSound);
|
super(false, false, "steelwall",
|
||||||
this.loadSprite(spriteName);
|
3, false, false,
|
||||||
|
false, "touch");
|
||||||
|
this.loadSprite("steelwall");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user