public void AddBullet()
        {
            idx++;
            BulletControler temp_con = new BulletControler(idx);
            this.CustomList.Add(temp_con);

            var temp = this.CustomList;
            this.CustomList = new List<BulletControler>(temp);
        }
Beispiel #2
0
        public void AddBullet()
        {
            idx++;
            BulletControler temp_con = new BulletControler(idx);

            this.CustomList.Add(temp_con);

            var temp = this.CustomList;

            this.CustomList = new List <BulletControler>(temp);
        }
Beispiel #3
0
 void Update()
 {
     if (isFiring)
     {
         shotCounter -= Time.deltaTime;
         if (shotCounter <= 0)
         {
             shotCounter = timeBetweenShots;
             BulletControler newBullet = Instantiate(bullet, firePoint.position, firePoint.rotation) as BulletControler;
             newBullet.setShooter(shooter);
             newBullet.transform.rotation = transform.rotation;
         }
     }
     else
     {
         shotCounter = 0;
     }
 }