コード例 #1
0
    private void Update()
    {
        if (!_spawnQueue.Any())
        {
            return;
        }

        _spawnTime -= Time.deltaTime;
        if (_spawnTime > 0)
        {
            return;
        }


        PlatoonBehaviour previewPlatoon = _spawnQueue.Dequeue();

        previewPlatoon.Spawn(transform.position);

        if (_spawnQueue.Count > 0)
        {
            _spawnTime += MIN_SPAWN_INTERVAL;
        }
        else
        {
            _spawnTime = QUEUE_DELAY;
        }
    }
コード例 #2
0
 public void Spawn(Vector3 pos)
 {
     BuildRealPlatoon();
     _platoonBehaviour.Spawn(pos);
 }