Exemplo n.º 1
0
 /// <summary>
 /// Updates the object once per frame.
 /// </summary>
 private void Update()
 {
     if (mtb.isMoving)
     {
         transform.position = mtb.Move();
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Updates the object once per frame.
        /// </summary>
        private void Update()
        {
            if (!World.Instance.GamePaused)
            {
                if (mtb.isMoving)
                {
                    _movableObject.position = mtb.Move();
                    if (mtb.beamReached)
                    {
                        mtb.beamReached = false;
                        BeamReached     = true;
                    }
                }

                if (stayUpright)
                {
                    //transform.rotation = Quaternion.Euler(Vector3.zero);
                    transform.LookAt(transform.position + Vector3.up);
                }
            }
        }