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); } }
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); } }