Пример #1
0
        /// <Summary>
        /// Create sequences for each node in the scene
        /// </Summary>
        private void createSequence_Node(TowerSpawnNode anchor)
        {
            // InputSequence sequence = sequenceManager.CreateSequence(getNewSequnceText(nodeStringCollection), anchor.transform);
            InputSequence sequence = typerSegmentManager.createNewSequence(nodeStringCollection, anchor.transform);

            sequence.OnCompleted += delegate {
                anchor.TowerSpawnReady = false;
                anchor.HasTowerSpawned = true;
                spawnTower(towerSpawnIndex, anchor);
            };
        }
Пример #2
0
        // /// <Summary>
        // /// Returns new string of text sequence by string collection passed in
        // /// </Summary>
        // private string getNewSequnceText(StringCollection collection)
        // {
        //     return sequenceManager.GetUniquelyTargetableString(collection);
        // }

        /// <Summary>
        /// Spawn a tower based on its spawn location passed in, and the current tower to spawn
        /// </Summary>
        private void spawnTower(int towerToSpawn, TowerSpawnNode spawnLoc)
        {
            Debug.Log("Spawning tower: " + towers[towerToSpawn].name);
            clone = Instantiate(towers[towerToSpawn], spawnLoc.transform.position, transform.rotation);
            clone.transform.parent = spawnLoc.transform;
        }