Shooting automativly without using GetButton?

Is it possible to do this? I am making a touch application so i cannot use a keyboard or a mouse, but i need my cannon to shoot by it self. All reserach i have done has to do with “getButton” to make a thing shoot. Can this be done automaticly?

If it’s for an AI, use a timer and linecasting, like this:

var shootTimer : float = 0;	
var fireRate : float = 1;

function Update(){	

	var layermask = 1<<8; //8 is the layer number to be ignored
	layermask = ~layermask;
	if(!Physics.Linecast(transform.position, player.gameObject.transform.position, layermask)){
		//this draws a line from the attatched object(cannon) to the player, ignoring
		//any colliders on layer 8. (The player should be on layer 8).
		//If the cannon can see the player, look at it
		if(shootTimer > 0){
			shootTimer -= Time.deltaTime;
		if(shootTimer <= 0){
			//shoot at player (either using projectiles or raycastHit)
			shootTimer = fireRate;