Add Wind
This commit is contained in:
parent
3cd0451765
commit
bcf6584fc9
@ -22,4 +22,5 @@ public interface Constants {
|
||||
public static final double GRAVITATION_ACCELERATION = 9.81;
|
||||
public static final int PLAYERS_BLOCK_COUNT = 24;
|
||||
public static final int MAX_ROUNDS = 5;
|
||||
public static final double MAX_WIND_STRENGTH = 2.0;
|
||||
}
|
||||
|
21
src/com/annimon/turrets/Wind.java
Normal file
21
src/com/annimon/turrets/Wind.java
Normal file
@ -0,0 +1,21 @@
|
||||
package com.annimon.turrets;
|
||||
|
||||
import com.annimon.turrets.util.Util;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author aNNiMON
|
||||
*/
|
||||
public class Wind implements Constants {
|
||||
|
||||
private double speed;
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void change() {
|
||||
speed = Util.rand(-MAX_WIND_STRENGTH, MAX_WIND_STRENGTH);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user