public override ContractParameter Generate(Contract contract) { ReachState param = new ReachState(targetBodies, biome == null ? "" : biome.biome, situation, minAltitude, maxAltitude, minTerrainAltitude, maxTerrainAltitude, minSpeed, maxSpeed, minRateOfClimb, maxRateOfClimb, minAcceleration, maxAcceleration, title); param.FailWhenUnmet = failWhenUnmet; return(param); }
void ResetToStatic() { //Swap to static CurrentReach = 0; reachState = ReachState.Static; //ZEK curCharge = 0; //Resets the initial retract curve to be the empty one RetractCurve = EmptyRetractCurve; //Resets the initial EndY to be Empthy EndY = EmptyEndY; }
void Retract(bool BallHit) { if (BallHit) { //Set the current reach to one CurrentReach = 1; //Set the retract curve to the hit one RetractCurve = HitRetractCurve; //Determine the HitEndY and then apply it to the HitY //Set the current Y to be the HitEndY HitEndY = transform.localPosition.y;// Mathf.LerpUnclamped(StartY, Mathf.Lerp(ChargeReachY, EndY, curCharge), EvaluatedReach); //Set the EndY to the Hit End Y EndY = HitEndY; } else { reachState = ReachState.Retracting; } }
void Reach() { reachState = ReachState.Reaching; }