void Update() { //UpArrow if (Input.GetKeyUp(KeyCode.UpArrow)) { cellHandler.Swipe(Direction.UP); } //DownArrow if (Input.GetKeyUp(KeyCode.DownArrow)) { cellHandler.Swipe(Direction.DOWN); } //LeftArrow if (Input.GetKeyUp(KeyCode.LeftArrow)) { cellHandler.Swipe(Direction.LEFT); } //RightArrow if (Input.GetKeyUp(KeyCode.RightArrow)) { cellHandler.Swipe(Direction.RIGHT); } }
protected override void Update() { base.Update(); _keyInput.Update(this); _directionInput.Update(Input.mousePosition, Camera.main.WorldToScreenPoint(Position), this); }