Exemplo n.º 1
0
 protected virtual void Update()
 {
     if (Input.GetKey(positiveKey))
     {
         mechanism.DriveMechanism(1.0f);
     }
     else if (Input.GetKey(negativeKey))
     {
         mechanism.DriveMechanism(-1.0f);
     }
 }
Exemplo n.º 2
0
        public void DriveMechanism(bool positive = true)
        {
            float dir = positive ? 1.0f : -1.0f;

            if (!mechanism || !driveCapability)
            {
                return;
            }
            mechanism.DriveMechanism(dir);
        }