mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 09:54:28 -05:00
weather wheel and weather adjustments
This commit is contained in:
@@ -7,19 +7,17 @@ public class dNitroNitroingState : dNitroBaseState
|
||||
|
||||
private float tempTimer; // temporary timer
|
||||
private float actualMaxVel; // actual max velocity
|
||||
private float actualAcc; // actual acceleration
|
||||
|
||||
public override void EnterState(dNitroStateManager nSM, dNitroBaseState previousState){
|
||||
actualMaxVel = nSM.pStats.MaxVel; // saves previous max velocity
|
||||
actualAcc = nSM.pStats.Acc; // saves previous max acc
|
||||
nSM.pStats.Acc += nSM.nitroAccBoost; // increases acceleration
|
||||
nSM.pStats.CurAcc += nSM.nitroAccBoost; // increases acceleration
|
||||
nSM.pStats.MaxVel += nSM.nitroVelBoost; // increases max velocity
|
||||
|
||||
tempTimer = 5; // how long we will be sped up
|
||||
}
|
||||
|
||||
public override void ExitState(dNitroStateManager nSM, dNitroBaseState nextState){
|
||||
nSM.pStats.Acc = actualAcc; // reset acceleration
|
||||
nSM.pStats.CurAcc = nSM.pStats.Acc; // reset acceleration
|
||||
nSM.pStats.MaxVel = actualMaxVel; // reset maximum velocity
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user