// Update is called once per frame void Update() { if (TouchButton.IsPressing()) { canMove = true; anim.SetBool("Run", true); } else { canMove = false; anim.SetBool("Run", false); } if (canMove) { if (this.gameObject == GameController.instance.armyList[0].gameObject) { startMove = true; } if (startMove) { localPlayerZ += transform.position.z; transform.position = new Vector3(transform.position.x, transform.position.y, (transform.position.z) + runSpeed * 0.025f * Time.deltaTime); } } TurnThePlayer(); }