Java tutorial
/* * Copyright 2017 TheNightForum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tnf.ptm.handler.input; import com.badlogic.gdx.math.Vector2; import com.tnf.ptm.common.Const; import com.tnf.ptm.common.PtmGame; import com.tnf.ptm.entities.ship.PtmShip; import com.tnf.ptm.entities.ship.hulls.HullConfig; /** * Just stays wherever it is, but maneuvers */ public class NoDestProvider implements MoveDestProvider { public NoDestProvider() { } @Override public Vector2 getDest() { return null; } @Override public boolean shouldAvoidBigObjs() { return false; } @Override public float getDesiredSpdLen() { return Const.DEFAULT_AI_SPD; } @Override public boolean shouldStopNearDest() { return false; } @Override public void update(PtmGame game, Vector2 shipPos, float maxIdleDist, HullConfig hullConfig, PtmShip nearestEnemy) { } @Override public Boolean shouldManeuver(boolean canShoot, PtmShip nearestEnemy, boolean nearGround) { return null; } @Override public Vector2 getDestSpd() { return Vector2.Zero; } }