예제 #1
0
 public void makeFistsWhenTogether(Metronome metronome)
 {
     // flap the hands twice per second on the beat
     if ((leftSideStopped && rightSideStopped) ||
         ((int)(metronome.elapsed(Time.time) * 2f)) % 2 == 1)
     {
         guyWithArmOut.visible(true);
         otherArm.visible(true);
         otherFist.visible(false);
         guyWithFist.visible(false);
     }
     else
     {
         otherFist.transform.position   = otherArm.transform.position;
         guyWithFist.transform.position = guyWithArmOut.transform.position;
         otherFist.visible(true);
         guyWithFist.visible(true);
         guyWithArmOut.visible(false);
         otherArm.visible(false);
     }
 }
예제 #2
0
 public void makeFistsWhenTogether(Metronome metronome)
 {
     // flap the hands twice per second on the beat
     if ((leftSideStopped && rightSideStopped)
         || ((int) (metronome.elapsed(Time.time) * 2f)) % 2 == 1) {
         guyWithArmOut.visible(true);
         otherArm.visible(true);
         otherFist.visible(false);
         guyWithFist.visible(false);
     } else {
         otherFist.transform.position = otherArm.transform.position;
         guyWithFist.transform.position = guyWithArmOut.transform.position;
         otherFist.visible(true);
         guyWithFist.visible(true);
         guyWithArmOut.visible(false);
         otherArm.visible(false);
     }
 }