示例#1
0
 public override void LogicUpdate()
 {
     if (currentTime < time)
     {
         motion.SetSpeedX(currentSpeed);
     }
     else if (currentTime < time + wait)
     {
         motion.SetSpeedX(0);
     }
     else
     {
         currentTime   = 0;
         currentSpeed *= -1;
         motion.SetSpeedX(2 * currentSpeed);
     }
     currentTime += Time.deltaTime;
 }
示例#2
0
 public override void Entry()
 {
     motion?.SetSpeedX(0);
 }