void Start() { SetCam(defaultCam); GetComponent <Animator>().enabled = true; _driverCrashDetector = GetComponentInParent <DriverCrashDetector>(); // set default cam follow targets defaultCam.m_LookAt = transform.root; environmentCrashLeft.m_LookAt = transform.root; environmentCrashCentre.m_LookAt = transform.root; environmentCrashRight.m_LookAt = transform.root; environmentWarning1Left.m_LookAt = transform.root; environmentWarning1Centre.m_LookAt = transform.root; environmentWarning1Right.m_LookAt = transform.root; }
protected void StartState(Animator animatorLocal) { myAnimator = animatorLocal; // setup _driverCinematicCamBehaviourDictionary = myAnimator.GetComponent <DriverCinematicCamBehaviourDictionary>(); _driverCrashDetector = myAnimator.GetComponentInParent <DriverCrashDetector>(); _driverCinematicCam = myAnimator.GetComponent <DriverCinematicCam>(); locked = true; crashTimeout = false; cooldown = backTimeoutTime; lockCooldown = minimumStateTime; if (setCam) { _driverCinematicCam.SetCam(stateCam); } }
protected new void Start() { baseCollisionResistance = deathForce / maxHealth; myRb = GetComponent <PhysXRigidBody>(); if (GetComponent <HotPotatoManager>() != null) { hasHotPotatoManager = true; hotPotatoManager = GetComponent <HotPotatoManager>(); collisionNpv = GetComponent <NetworkPlayerVehicle>(); if (collisionNpv != null && !collisionNpv.botDriver) { driverCrashDetector = GetComponent <DriverCrashDetector>(); } } base.Start(); }