// Use this for initialization
void Start () {
//Get a component reference to the Character's animator component
animator = GetComponent<Animator>();
render = GetComponent<SpriteRenderer>();
//Get the rigid body on the prefab
bullBody = GetComponent<Rigidbody2D>();
//Set our bullet strength and speed
strength = 4;
speed = 40;
//Go after our player!
player = GameObject.Find("Player").GetComponent<Player>();
//Get our Player current Direction
if (player.getDirection () > 0 ||
(player.getDirection() == 0 && player.getLastDirection() > 0 )) {
animator.SetInteger ("Direction", 1);
playerRight = true;
} else {
playerRight = false;
animator.SetInteger ("Direction", -1);
}
//Play our shooting sound
shoot = GameObject.Find ("Shoot").GetComponent<AudioSource> ();
shoot.Play ();
//Get our camera script
actionCamera = Camera.main.GetComponent<ActionCamera>();
}