private void SpawnEnermy(Enermy prefab, float spawnProp)
        {
            if (Random.value < spawnProp)
            {
                Enermy ins = Instantiate <Enermy>(prefab);

                ins.autoShoot = Random.value <= m_autoShootProp;

                ins.canChangeMoveDir = Random.value <= m_changeDirProp;

                ins.SetMoveSpeed(Random.value * 1.8f);
                ins.transform.localPosition = m_spwanPoint.localPosition + Vector3.right * Random.Range(-1.5f, 1.5f);
            }
        }
Example #2
0
 protected virtual void OnBulletHit(Enermy enermy)
 {
 }