Ejemplo n.º 1
0
    public void SpawnEnemy(BaseEnemy.BaseStats stats)
    {
        BaseEnemy enemy = Instantiate(Enemy);

        enemy.stats              = stats;
        enemy.health             = stats.health;
        enemy.speed              = stats.speed;
        enemy.money              = stats.money;
        enemy.transform.position = transform.position;
        EnemyControllerScript.Instance.AddEnemy(enemy);
        if (++spawnedCount == count)
        {
            Destroy(this.gameObject);
        }
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     Stats        = new BaseEnemy.BaseStats(10, 0.01f, 5, false);
     spawnedCount = 0;
     lastSpawn    = DateTime.MinValue;
 }