// Use this for initialization void Start() { um = GameObject.Find("TextUI").GetComponent <uiManager>(); bm = GameObject.Find("bulletUI").GetComponent <bulletManager>(); sr = GetComponent <SpriteRenderer>(); bulletbtn = GameObject.Find("bulletUp"); }
private void Awake() { if (singleton == null) { singleton = this; return; } Destroy(this); }
void Start() { manager = FindObjectOfType <bulletManager>(); }
// Use this for initialization void Start() { gun = GameObject.FindWithTag("Weapon").GetComponent <bulletManager>(); }