Weapos Rejiggered
Modified weapon scripts to eliminate specialized projectile behavior - allows charged weapons to have projectiles and modify weapon stats when charged Added machine gun weapon & VFX Moved third party code to Plugins folder to improve compile times
This commit is contained in:
parent
2a0fe34611
commit
dbc522a224
2105 changed files with 7033 additions and 1141 deletions
|
|
@ -7,6 +7,7 @@ public class ConstantLaser : MonoBehaviour
|
|||
public AnimationCurve StartCurve;
|
||||
public AnimationCurve EndCurve;
|
||||
public AnimationCurve IntensityCurve;
|
||||
public float WidthMultiplier = 1;
|
||||
public float StartDuration;
|
||||
public float FadeDuration;
|
||||
public float CycleDuration;
|
||||
|
|
@ -40,7 +41,7 @@ public class ConstantLaser : MonoBehaviour
|
|||
if (_stopping)
|
||||
{
|
||||
var lerp = (Time.time - _startTime) / FadeDuration;
|
||||
LineRenderer.widthMultiplier = EndCurve.Evaluate(lerp) * _stopIntensity;
|
||||
LineRenderer.widthMultiplier = EndCurve.Evaluate(lerp) * _stopIntensity * WidthMultiplier;
|
||||
|
||||
if (lerp > 1)
|
||||
{
|
||||
|
|
@ -59,11 +60,11 @@ public class ConstantLaser : MonoBehaviour
|
|||
_cycleStartTime = Time.time;
|
||||
}
|
||||
_intensity = IntensityCurve.Evaluate((Time.time - _cycleStartTime) / CycleDuration % CycleDuration);
|
||||
LineRenderer.widthMultiplier = _intensity;
|
||||
LineRenderer.widthMultiplier = _intensity * WidthMultiplier;
|
||||
}
|
||||
else
|
||||
{
|
||||
LineRenderer.widthMultiplier = StartCurve.Evaluate(lerp);
|
||||
LineRenderer.widthMultiplier = StartCurve.Evaluate(lerp) * WidthMultiplier;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue