// Use this for initialization void Awake() { bulletList = new List <Bullet>(); if (SpicySpriteManager.Instance != null) { Debug.LogError("2 or more SpicySpriteManager instances were found!"); } SpicySpriteManager.Instance = this; StartCoroutine(CleanupSprites()); }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { SpicySpriteManager.AddBullet(muzzle.position, muzzle.rotation); audioSource.Play(); } else if (Input.GetKeyDown(KeyCode.Q)) { GameObject shot = Instantiate(bulletTimePrefab, muzzle.position, muzzle.rotation); } }