public void Init(IMouseAction a, Canvas canvas)
 {
     _mouseAction           = a;
     _mouseAction.Started  += OnStarted;
     _mouseAction.Finished += OnFinished;
     _canvas = canvas;
 }
    void OnMouseActionEnqueued(IMouseAction m)
    {
        GameObject clickView = GameObject.Instantiate(_testingBotClickViewPrefab);

        clickView.transform.SetParent(transform);
        clickView.transform.localScale = Vector3.one;
        clickView.GetComponent <TestingBotClickView>().Init(m, _canvas);
    }
Ejemplo n.º 3
0
 public static void ForewardDragOver(IMouseAction baseAction, IVidgetBackend backend, DragOverEventArgs e)
 {
     if (baseAction.Enabled)
     {
         var pt = e.Position;
         baseAction.OnMouseMove(new MouseActionEventArgs(MouseActionButtons.None, ModifierKeys.None, 0, pt.X, pt.Y, 0));
     }
 }
 void OnStarted(IMouseAction obj)
 {
     _started = true;
     gameObject.SetActive(true);
     _animator.Play("Click");
 }
 void OnFinished(IMouseAction obj)
 {
     _finished = true;
 }