Exemplo n.º 1
0
        private void SpawnEnemy(EnemySetup enemySetup, Vector3 position)
        {
            var spawnPoint = Instantiate(AppModel.SpawnPointPrefab(), position, Quaternion.identity);

            spawnPoint.OnSpawn    += OnSpawn;
            spawnPoint.SpawnObject = enemySetup.EnemyObject;
        }
Exemplo n.º 2
0
        private void SpawnEnemy(EnemySetup enemySetup)
        {
            var xCoord     = AppModel.random.NextFloat(_bounds.min.x, _bounds.max.x);
            var yCoord     = AppModel.random.NextFloat(_bounds.min.y, _bounds.max.y);
            var spawnPoint = Instantiate(AppModel.SpawnPointPrefab(), new Vector3(xCoord, yCoord, 0), Quaternion.identity);

            spawnPoint.OnSpawn    += OnSpawn;
            spawnPoint.SpawnObject = enemySetup.EnemyObject;
        }