Ejemplo n.º 1
0
 void Update()
 {
     if (idle)
     {
         idleTimer += Time.deltaTime;
         if (idleTimer > nextIdleTime)
         {
             idleTimer    = 0;
             nextIdleTime = Random.Range(idleWaitTimeMin, idleWaitTimeMax);
             idleSounds.PlayRandomSound(ref source);
         }
     }
 }
Ejemplo n.º 2
0
 public void Attack()
 {
     attackSounds.PlayRandomSound(ref source);
 }