Exemple #1
0
 public void Spawn(Vector3 position)
 {
     pos.position    = position;
     damage          = infoTower.damage;
     attakSpeed      = infoTower.attakSpeed;
     attakRange      = infoTower.attakRange;
     typeTower       = infoTower.typeTower;
     typeAttak       = infoTower.typeAttak;
     render.material = standart;
     sound           = GetComponent <AllSounds>();
     sound.AddSound();
     creation = false;
     AddCell((int)position.x, (int)position.y);
 }
Exemple #2
0
        private Sound(string audioNameIn, float volumeIn = 1f)
        {
            audioName = audioNameIn;
            volume    = volumeIn;

            instances = new List <SoundEffectInstance>();

            if (AllSounds == null)
            {
                AllSounds = new List <Sound>();
            }

            AllSounds.Add(this);
        }