Example #1
0
    private void Update()
    {
        rect.position = UIManager.InsideScreenPos(UIManager.TargetMarkerPosition(), rect.sizeDelta.x / 2);

        Graphic graphic = GazeManager.RaycastUI();

        if (graphic == null)
        {
            return;
        }

        if (graphic.Equals(buttWalk))
        {
            Debug.Log("Walk state");
            PlayerController.SetState(PlayerController.PlayerState.MoveState);
            CloseWheels();
        }
        else if (graphic.Equals(buttInter))
        {
            Debug.Log("Inter state");
            PlayerController.SetState(PlayerController.PlayerState.IdleState);
            CloseWheels();
        }
        else if (graphic.Equals(buttExit))
        {
            //Exit
            //Debug.Log("Exit");
            CloseWheels();
        }
    }
Example #2
0
    private void Update()
    {
        rect.position = UIManager.InsideScreenPos(UIManager.TargetMarkerPosition(), rect.sizeDelta.x / 2);

        Graphic graphic = GazeManager.RaycastUI();

        if (graphic == null)
        {
            return;
        }

        if (graphic.Equals(buttSpell1))
        {
            PlayerController.ThrowSpell(1);
            CloseWheel();
        }
        else if (graphic.Equals(buttSpell2))
        {
            PlayerController.ThrowSpell(2);
            CloseWheel();
        }
        else if (graphic.Equals(buttExit))
        {
            //Exit
            //Debug.Log("Exit");
            CloseWheel();
        }
    }
Example #3
0
    private void TargetMarkerSelectUpdate()
    {
        Graphic graphic = GazeManager.RaycastUI();

        if (graphic == null)
        {
            return;
        }

        if (graphic.Equals(UIManager.Instance.targetMarker))
        {
            if (UIManager.Target != null)
            {
                bool isKillable = UIManager.TargetType().IsSubclassOf(typeof(Killable));
                if (!isKillable)
                {
                    ToggleMoveState();
                }
                else
                {
                    playerState = PlayerState.SpellPick;
                    //UIManager.ShowStateWheel(isPlayer);
                    UIManager.ShowSpellWheel(isKillable);
                }
            }
        }
    }
 private void GoToVisualState(Graphic graphic, string stateName)
 {
     if (rowsPresenter != null && rowsPresenter.Children != null)
     {
         foreach (UIElement element in rowsPresenter.Children)
         {
             DataGridRow row = element as DataGridRow;
             if (row != null)
             {
                 Graphic g = DataSourceCreator.GetGraphicSibling(row.DataContext);
                 if (graphic.Equals(g))
                 {
                     VisualStateManager.GoToState(row, stateName, true);
                     break;
                 }
             }
         }
     }
 }
Example #5
0
 public bool Equals(BuffIcon other)
 {
     return(Graphic.Equals(other.Graphic));
 }
 private bool AreEqual(object item, Graphic graphic)
 {
     return(graphic.Equals(DataSourceCreator.GetGraphicSibling(item)));
 }
 private void GoToVisualState(Graphic graphic, string stateName)
 {
     if (rowsPresenter != null && rowsPresenter.Children != null)
     {
         foreach (UIElement element in rowsPresenter.Children)
         {
             DataGridRow row = element as DataGridRow;
             if (row != null)
             {
                 Graphic g = DataSourceCreator.GetGraphicSibling(row.DataContext);
                 if (graphic.Equals(g))
                 {
                     VisualStateManager.GoToState(row, stateName, true);
                     break;
                 }
             }
         }
     }
 }
 private bool AreEqual(object item, Graphic graphic)
 {
     return graphic.Equals(DataSourceCreator.GetGraphicSibling(item));
 }