void SetComponent(){ drivetrain = GetComponent<Drivetrain>(); cardynamics = GetComponent<CarDynamics>(); forceFeedback= GetComponent<ForceFeedback>(); physicMaterials =GetComponent<PhysicMaterials>(); arcader= GetComponent<Arcader>(); aerodynamicResistance= GetComponent<AerodynamicResistance>(); axles= GetComponent<Axles>(); axisCarController = GetComponent <AxisCarController>(); mouseCarController = GetComponent <MouseCarController>(); mobileCarController = GetComponent <MobileCarController>(); fuelTanks=GetComponentsInChildren<FuelTank>(); wings=GetComponentsInChildren<Wing>(); }
void Start() { player = GameObject.Find("PLAYER"); FsmPlayerInCar = player.GetComponents <PlayMakerFSM>()[1].FsmVariables.FindFsmBool("PlayerInCar"); PlayerSpeed = player.transform.Find("Pivot/AnimPivot/Camera/FPSCamera").GetComponent <PlayMakerFSM>().FsmVariables.FindFsmFloat("PlayerSpeed"); guiDrive = PlayMakerGlobals.Instance.Variables.FindFsmBool("GUIdrive"); guiInteraction = PlayMakerGlobals.Instance.Variables.FindFsmString("GUIinteraction"); playerCurrentVehicle = PlayMakerGlobals.Instance.Variables.FindFsmString("PlayerCurrentVehicle"); playerStop = PlayMakerGlobals.Instance.Variables.FindFsmBool("PlayerStop"); playerMuscleControl = PlayMakerGlobals.Instance.Variables.FindFsmBool("PlayerMuscleControl"); playerCarControl = PlayMakerGlobals.Instance.Variables.FindFsmBool("PlayerCarControl"); forceFeedback = transform.root.GetComponent <ForceFeedback>(); PlayerVelocity = PlayMakerGlobals.Instance.Variables.FindFsmVector3("PlayerVelocity"); }
public void SetupFSMS() { forceFeedback = drivetrain.gameObject.GetComponent <ForceFeedback>(); FFBFactor = Options.FsmVariables.GetFsmInt("FFBFactor"); FFBMultiplier = Options.FsmVariables.GetFsmFloat("FFBMultiplier"); FFBClamp = Options.FsmVariables.GetFsmInt("FFBClamp"); FFBInverted = Options.FsmVariables.GetFsmBool("FFBInverted"); SteeringAid = Options.FsmVariables.GetFsmBool("SteeringAid"); SteeringAidMinVelo = Options.FsmVariables.GetFsmFloat("SteeringAidMinVelo"); SteeringTime = Options.FsmVariables.GetFsmFloat("SteeringTime"); SteeringVeloTime = Options.FsmVariables.GetFsmFloat("SteeringVeloTime"); SteeringRotation = Options.FsmVariables.GetFsmFloat("SteeringRotation"); AutoClutch = Options.FsmVariables.GetFsmBool("AutoClutch"); HShifter = Options.FsmVariables.GetFsmBool("HShifter"); Mirrors = Graphics.FsmVariables.GetFsmBool("CarMirrors"); HeadBobDrive = Graphics.FsmVariables.GetFsmInt("HeadBobDrive"); GearIndicator = Graphics.FsmVariables.GetFsmBool("GearIndicator"); AdjustOptions(); }
public void AddBurnTime(float timeToAdd) { if (burningTime < 0.1f && jumpTimeLeft < 0.1f) { Debug.Log("Added Burning Time"); burningTime += timeToAdd; ParticleManager.Instance.CreateStunParticle(transform); //stun particles GetComponent <FacialAnimation>().ChangeFaceToHit(); //Facial animation ForceFeedback.Vibrate(player); //vibrate if (CreditsController.Instance != null) { CreditsController.Instance.UpdatePlayerScore(1 - playerID); } //drop the held object too DropObject(); //drop self if held playerPickUp.ReverToState(); //audio AudioManager.instance.PlayEvent("Play_dizzy"); } }
void Start() { drivetrain = GetComponent <Drivetrain>(); axles = GetComponent <Axles>(); forceFeedback = GetComponent <ForceFeedback>(); }
void Start(){ drivetrain=GetComponent<Drivetrain>(); axles=GetComponent <Axles>(); forceFeedback=GetComponent <ForceFeedback>(); }