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(); }
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); } }
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); } }