コード例 #1
0
 private void Panel_MouseMove(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Middle)
     {
         OnCameraScroll?.Invoke(this, new CameraScrollArgs(new Vector2(e.Location.X, e.Location.Y)));
     }
 }
コード例 #2
0
ファイル: Interact.cs プロジェクト: inducpham/game-test-01
 public void OnScroll(PointerEventData eventData)
 {
     onCameraScroll?.Invoke(eventData.scrollDelta.y > 0 ? 1 : -1);
 }