Пример #1
0
    private void Start()
    {
        // Я так и не смог придумать, как сделать это умнее.
        PlayerTankController player = _playerSpawner.Spawn(0).GetComponent <PlayerTankController>();

        _inputListener.Init(player);
    }
    private void Spawn(Unit.UnitType type)
    {
        Vector2 position = Random.insideUnitCircle.normalized * 3.0f;

        position = position + new Vector2(transform.position.x, transform.position.y);

        m_unitSpawner.Spawn(type, transform.position, position, PlayerTag);
    }
Пример #3
0
 void OnEnable()
 {
     for (var i = 0; i < amount; i++)
     {
         spawner.Spawn();
     }
     gameObject.SetActive(false);
 }
        public void StartFillingRoom()
        {
            foreach (var unitPrefab in _unitPrefabsToSpawn)
            {
                if (unitPrefab != null)
                {
                    _spawner.Spawn(unitPrefab);
                }
            }

            OnAllUnitsSpawned?.Invoke();
        }
Пример #5
0
 /*
  * DONE Step 1: Create a deck with all the possible cards that can be played
  * Step 2: Grab a pair and put them in a grabbedCardsList
  * step 3: Shuffle the deck
  * step 4: place the deck
  * step 5: when a pair is matched add it to a pairedCardsList
  * step 6: when the timer has ran out.
  */
 void Start()
 {
     CreateDeck(20);
     unitSpawner.Spawn(array, array);
 }
Пример #6
0
 private void SpawnObject(GameObject spawn, UnitData unitData)
 {
     UnitSpawner.Spawn(m_SpawnObject, unitData);
 }