Exemplo n.º 1
0
	void Start()
	{
		// register for damage callback (rumble and shake)
		_playerHealth.RegisterHealthCallback( TargetDamageCallback );

		_camShake = Camera.main.gameObject.GetComponent<CameraShake>();
		_rumbler = Camera.main.gameObject.GetComponent<RumbleManager>();

		_forwardVect = new Vector3();

		_lookTarget = (Instantiate( lookTarget, transform.position, Quaternion.identity ) as GameObject).GetComponent<Transform>();
		_crosshairs = _lookTarget.GetComponent<PlayerCrosshairs>();
	}
Exemplo n.º 2
0
    void Start()
    {
        // register for damage callback (rumble and shake)
        _playerHealth.RegisterHealthCallback(TargetDamageCallback);

        _camShake = Camera.main.gameObject.GetComponent <CameraShake>();
        _rumbler  = Camera.main.gameObject.GetComponent <RumbleManager>();

        _forwardVect = new Vector3();

        _lookTarget = (Instantiate(lookTarget, transform.position, Quaternion.identity) as GameObject).GetComponent <Transform>();
        _crosshairs = _lookTarget.GetComponent <PlayerCrosshairs>();
    }