1package com.fs.starfarer.api.impl.campaign.terrain;
3import org.lwjgl.util.vector.Vector2f;
5import com.fs.starfarer.api.EveryFrameScript;
6import com.fs.starfarer.api.Global;
7import com.fs.starfarer.api.campaign.CampaignFleetAPI;
8import com.fs.starfarer.api.util.Misc;
15 protected CampaignFleetAPI
fleet;
20 protected Vector2f
dV;
25 this.angle = direction;
29 dV = Misc.getUnitVectorAtDegreeAngle(
angle);
31 float fleetWeightFactor = (float)
fleet.getFleetPoints() / 200f;
32 if (fleetWeightFactor > 1f) fleetWeightFactor = 1f;
33 fleetWeightFactor = 0.5f + 1f * (1f - fleetWeightFactor);
36 float impact = speed * 1f * fleetWeightFactor;
45 Vector2f v =
fleet.getVelocity();
46 fleet.setVelocity(v.x +
dV.x * amount, v.y +
dV.y * amount);
static SettingsAPI getSettings()
static float IMPACT_SPEED_DELTA
void advance(float amount)
static float DURATION_SECONDS
ShoveFleetScript(CampaignFleetAPI fleet, float direction, float intensity)
float getSpeedPerBurnLevel()