private void Start() { // Get the transform of the main camera to allow for camera-relative controls if (Camera.main != null) { cam = Camera.main.transform; } else { Debug.LogWarning( "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls."); } // Initialize variables character = GetComponent<RobotCharacter>(); ragdoll = GetComponent<RobotRagdoll>(); particle = GetComponent<RobotParticleManager>(); energy = GetComponent<RobotEnergy>(); isoCam = Camera.main.GetComponent<IsometricCamera>(); GM = GameObject.Find("GameManager").GetComponent<GameManager>(); gui = GameObject.Find ("GUI").GetComponentInChildren<GUIManager>(); entity = GetComponentInChildren<EntityRig>(); crouch = false; guard = false; leftTriggerReleased = true; rightTriggerReleased = true; energy.StartEnergyDrain(); }
void Start () { // Initialize variables anim = GetComponent<Animator>(); psManager = GetComponent<RobotParticleManager>(); hasEnteredAir = false; pastGroundState = true; }