예제 #1
0
 // Update is called once per frame
 void Update()
 {
     rotateCounter += Time.deltaTime;
     shootCounter  += Time.deltaTime;
     if (rotateCounter > beatPeriod)
     {
         turret.PlayRotationAnimation();
         rotateCounter -= beatPeriod;
     }
     if (shootCounter > beatPeriod)
     {
         turret.PlayShootAnimation();
         shootCounter -= beatPeriod;
     }
 }