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();
    }
	// Use this for initialization
	void Start () 
	{
		anim = GetComponent<Animator>();
		ai = GetComponentInChildren<AIRig>();
		col = GetComponent<CapsuleCollider>();
		startingHealth = Health;
		playerEnergy = GameObject.Find("Player").GetComponent<RobotEnergy>();
	}