Exemple #1
0
 public void DelEnemyBullet(EnemyBullet _scp)
 {
     if (gameObject.activeSelf)
     {
         listEnemyBullet.Remove(_scp);
     }
 }
Exemple #2
0
        void CreateEnemyBullet()
        {
            Debug.Log("Instance EnemyBullet");
            Vector3     _pos = transform.position + (new Vector3(Random.Range(-rangeMax.x, rangeMax.x), Random.Range(-rangeMax.y, rangeMax.y), transform.position.z));
            EnemyBullet _scp = PoolManager.ins.Instantiate("EnemyBullet", _pos, Quaternion.identity).GetComponent <EnemyBullet>();

            //callback register and list register.
            _scp.InitFirst(this);
            listEnemyBullet.Add(_scp);
        }