// Use this for initialization
	void Start () 
	{		
		// Se obtienen los componentes iniciales.
		thisTransform = transform;
		thisGameObject = gameObject;
		simulateFire = GetComponent<SimulateFire>();
		
		// Se asigna la dirección de tiro que se usará para lanzar las bombas.
		vDirBomb = Quaternion.AngleAxis( -fAngleBomb, thisTransform.right) * thisTransform.forward;
		
		// Se crea la lista donde estarán las bombas existentes
		listBombs = new List<Rigidbody>();

		// Se inicializan variables.
		simulateFire.bSimulateBomb = false;
		iLevelBomb = 0;
		iLevelShot = 0;
	
	}
    // Use this for initialization
    void Awake()
    {
        // Se obtienen los componentes iniciales.
        thisTransform = transform;
        thisGameObject = gameObject;
        gun = thisTransform.FindChild( "Gun");
        grenades = thisTransform.FindChild( "Grenades");
        simulateFire = GetComponent<SimulateFire>();

        // Se crea la lista donde estarán las bombas existentes
        listBombs = new List<Rigidbody>();

        // Se inicializan variables.
        simulateFire.bSimulateBomb = false;
        iLevelBomb = 0;
        _iLevelShot = 0;
    }