C# Class ProjectStorms.CannonFire

This script pools the cannonball prefab objects, and fires them when triggered.
Inheritance: UnityEngine.MonoBehaviour
Show file Open project: patferguson/Storms-Project

Public Properties

Property Type Description
cannon ECannonPos
cannonBallForce float
cannonBallPrefab UnityEngine.GameObject
lookAtTarget UnityEngine.Transform
parentAirship UnityEngine.GameObject
shotCooldown float

Public Methods

Method Description
Awake ( ) : void
Fire ( ) : void
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
CreateCannonball ( Transform a_holderTrans ) : GameObject

Method Details

Awake() public method

public Awake ( ) : void
return void

Fire() public method

public Fire ( ) : void
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

cannon public property

Where the cannon is relative to the ship, see ECannonPos.
public ECannonPos cannon
return ECannonPos

cannonBallForce public property

How much force to launch the cannon balls with.
public float cannonBallForce
return float

cannonBallPrefab public property

Which cannonball prefab to spawn.
public GameObject,UnityEngine cannonBallPrefab
return UnityEngine.GameObject

lookAtTarget public property

Handle to the player firing reticle.
public Transform,UnityEngine lookAtTarget
return UnityEngine.Transform

parentAirship public property

Handle to the parent airship.
public GameObject,UnityEngine parentAirship
return UnityEngine.GameObject

shotCooldown public property

Minimum time between shots.
public float shotCooldown
return float