public class Character {
/** les caractéristiques par défaut de toutes les instances
* de Character, d'où staticité
*/
public static Characteristics DEFAULT_CHARACTERISTICS=
new Characteristics(0.3,
100.0,
1.0,
1.0,
0.5);
}
public class Ennemy extends Character {
static{
// ici le clone ?
}
}
public class Characteristics {
public double speed;
public double health;
public double endurance;
public double strength;
public double range;
public Characteristics(double sp, double l, double e, double s, double r){
speed=sp;
health=l;
endurance=e;
strength=s;
range=r;
}
}
|