Target Schematic & Various Improvements
Targeting an enemy now shows their schematic Added Longinus Hull Fixed projectile overpenetration Fixed projectiles colliding with minimap icons Added Schematic hit flashing Thruster torque multiplier Thruster torque threshold
This commit is contained in:
parent
fddd485262
commit
20e9f89228
24 changed files with 5519 additions and 386 deletions
|
|
@ -60,14 +60,14 @@ public class Thruster : IAnalogBehavior
|
|||
var itemData = context.GetData(item.EquippableItem);
|
||||
var itemCenter = hullData.Shape.Inset(itemData.Shape, item.Position, item.EquippableItem.Rotation).CenterOfMass;
|
||||
var toCenter = hullCenter - itemCenter;
|
||||
Torque = -dot(toCenter, float2(1, 0).Rotate(item.EquippableItem.Rotation));
|
||||
Torque = -dot(normalize(toCenter), float2(1, 0).Rotate(item.EquippableItem.Rotation));
|
||||
}
|
||||
|
||||
public bool Execute(float delta)
|
||||
{
|
||||
Thrust = Context.Evaluate(_data.Thrust, Item.EquippableItem, Entity);
|
||||
Entity.Velocity -= Entity.Direction.Rotate(Item.EquippableItem.Rotation) * _input * Thrust / Entity.Mass * delta;
|
||||
Entity.Direction = mul(Entity.Direction, Unity.Mathematics.float2x2.Rotate(_input * Torque * Thrust / Entity.Mass / 100 * delta));
|
||||
Entity.Direction = mul(Entity.Direction, Unity.Mathematics.float2x2.Rotate(_input * Torque * Thrust * Context.GameplaySettings.TorqueMultiplier / Entity.Mass * delta));
|
||||
Item.AddHeat(_input * Context.Evaluate(_data.Heat, Item.EquippableItem, Entity) * delta);
|
||||
Entity.VisibilitySources[this] = _input * Context.Evaluate(_data.Visibility, Item.EquippableItem, Entity);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -107,4 +107,6 @@ public class GameplaySettings
|
|||
public float LockIndicatorNoiseAmplitude = 50f;
|
||||
public ExponentialLerp LockIndicatorFrequency;
|
||||
public ExponentialLerp LockSpinSpeed;
|
||||
public float TorqueFloor;
|
||||
public float TorqueMultiplier;
|
||||
}
|
||||
|
|
@ -42,8 +42,8 @@ public class Ship : Entity
|
|||
_reverseThrusters = _allThrusters.Where(x => x.Item.EquippableItem.Rotation == ItemRotation.None).ToArray();
|
||||
_rightThrusters = _allThrusters.Where(x => x.Item.EquippableItem.Rotation == ItemRotation.CounterClockwise).ToArray();
|
||||
_leftThrusters = _allThrusters.Where(x => x.Item.EquippableItem.Rotation == ItemRotation.Clockwise).ToArray();
|
||||
_counterClockwiseThrusters = _allThrusters.Where(x => x.Torque < -.05f).ToArray();
|
||||
_clockwiseThrusters = _allThrusters.Where(x => x.Torque > .05f).ToArray();
|
||||
_counterClockwiseThrusters = _allThrusters.Where(x => x.Torque < -ItemManager.GameplaySettings.TorqueFloor).ToArray();
|
||||
_clockwiseThrusters = _allThrusters.Where(x => x.Torque > ItemManager.GameplaySettings.TorqueFloor).ToArray();
|
||||
}
|
||||
|
||||
public Ship(ItemManager itemManager, Zone zone, EquippableItem hull) : base(itemManager, zone, hull)
|
||||
|
|
|
|||
Loading…
Reference in a new issue