float timeSpawned; // holds the spawn time for each bullet // Use this for initialization void Start() { timeSpawned = Time.time; // initialize spawn time to current time player = FindObjectOfType <BexPlayer>(); if (!player.IsFacingRight()) // if character is not facing right, change speed to go in opposite direction { speed = -speed; } }
// Use this for initialization void Start() { player = FindObjectOfType <BexPlayer>(); source = GetComponent <AudioSource>(); }