CmdPlayOnServer() private method

private CmdPlayOnServer ( string clip ) : void
clip string
return void
Beispiel #1
0
 public void chooseSound()
 {
     if (value % 2 == 0)
     {
         sounds.CmdPlayOnServer("groundslam1");
         value += 1;
     }
     else if (value % 2 > 0)
     {
         sounds.CmdPlayOnServer("groundslam2");
         value += 1;
     }
 }
Beispiel #2
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.tag == "Ground" && !playerAnimations.isAttacking() && !playerAnimations.isTakingDamage() && !playerAnimations.isIdle)
     {
         sounds.CmdPlayOnServer("SoundWalk");
     }
 }
 private void chooseSound()
 {
     if (clipIndex == 0)
     {
         sounds.CmdPlayOnServer("punch1");
         clipIndex += 1;
     }
     else if (clipIndex == 1)
     {
         sounds.CmdPlayOnServer("punch2");
         clipIndex += 1;
     }
     else if (clipIndex == 2)
     {
         sounds.CmdPlayOnServer("punch3");
         clipIndex += 1;
     }
     else if (clipIndex == 3)
     {
         sounds.CmdPlayOnServer("punch4");
         clipIndex -= 3;
     }
 }