Пример #1
0
 void Update()
 {
     if (path != null)
     {
         if (mover == null)
         {
             mover = path.CreateMover(control.maxSpeed * 0.5f);
         }
         control.move.x = Mathf.Clamp(mover.Position.x - transform.position.x, -1, 1);
     }
 }
 protected override void Update()
 {
     if (path != null)
     {
         if (_mover == null)
         {
             _mover = path.CreateMover(maxSpeed * 0.5f);
         }
         move.x = Mathf.Clamp(_mover.Position.x - transform.position.x, -1, 1);
     }
     base.Update();
 }
Пример #3
0
 void Update()
 {
     //Debug.Log(donut.GetComponent<CharacterSwapping>().currentCharacter.name);
     //Debug.Log("hello");
     if (path != null)
     {
         if (mover == null)
         {
             mover = path.CreateMover(control.maxSpeed * 0.5f);
         }
         control.move.x = Mathf.Clamp(mover.Position.x - transform.position.x, -1, 1);
     }
 }
Пример #4
0
        void Update()
        {
            if (path != null)
            {
                if (mover == null)
                {
                    mover = path.CreateMover(control.maxSpeed * 0.5f);
                }
                control.move.x = Mathf.Clamp(mover.Position.x - transform.position.x, -1, 1);
            }

            if (appleBullet)
            {
                transform.Translate(Vector3.left * Time.deltaTime, Space.World);
            }
        }