Change LookBehavior target initialization location

This commit is contained in:
Howard Stark 2018-08-05 19:26:31 -04:00
parent 68874751da
commit 956e212e39
No known key found for this signature in database
GPG Key ID: 9FA4E350B33067F3

View File

@ -12,7 +12,7 @@ public class LookBehavior extends Behavior {
public static final LookBehavior INSTANCE = new LookBehavior(); public static final LookBehavior INSTANCE = new LookBehavior();
public LookBehavior() { public LookBehavior() {
target = Optional.empty();
} }
/** /**
@ -21,7 +21,7 @@ public class LookBehavior extends Behavior {
* getFirst() -> yaw * getFirst() -> yaw
* getSecond() -> pitch * getSecond() -> pitch
*/ */
private Optional<Tuple<Float, Float>> target = Optional.empty(); private Optional<Tuple<Float, Float>> target;
public void updateTarget(Tuple<Float, Float> target) { public void updateTarget(Tuple<Float, Float> target) {
this.target = Optional.of(target); this.target = Optional.of(target);