// Use this for initialization void Start() { player_movementSpeed = GameObject.Find("Player").GetComponent <Player> (); health = GameObject.Find("Player").GetComponent <PlayerClass> (); bulletObj = Resources.Load("Prefabs/bullet") as GameObject; bullet = bulletObj.GetComponent <bulletClass>(); }
// Use this for initialization void Start() { bull = Resources.Load("Prefabs/bullet") as GameObject; bullet = bull.GetComponent <bulletClass> (); bull.GetComponent <Transform> ().localScale = bulletScale; bull.GetComponent <bulletClass> ().healthPoints = hp_default; }