예제 #1
0
 bool UIHitOrNot()
 {
     if (RectTransformUtility.RectangleContainsScreenPoint(EnemyTargetFrame.GetComponent <RectTransform> (), Input.mousePosition, null))
     {
         return(false);
     }
     else if (RectTransformUtility.RectangleContainsScreenPoint(FriendlyTargetFrame.GetComponent <RectTransform> (), Input.mousePosition, null))
     {
         return(false);
     }
     else if (RectTransformUtility.RectangleContainsScreenPoint(ActionBars.GetComponent <RectTransform> (), Input.mousePosition, null))
     {
         return(false);
     }
     else if (RectTransformUtility.RectangleContainsScreenPoint(PlayerTargetFrame.GetComponent <RectTransform> (), Input.mousePosition, null))
     {
         Target = Player;
         UpdateTargetInfo("Player");
         EnemyTargetFrame.SetActive(false);
         FriendlyTargetFrame.SetActive(true);
         return(false);
     }
     else
     {
         return(true);
     }
 }
예제 #2
0
    public void SelectBar(ActionBars bar)
    {
        MainBar.SetActive(false);
        RoomBar.SetActive(false);
        SpellBar.SetActive(false);
        BackButton.SetActive(true);
        SettingButton.SetActive(true);

        switch (bar)
        {
            case ActionBars.MainBar:
                MainBar.SetActive(true);
                BackButton.SetActive(false);
                break;
            case ActionBars.RoomBar:
                RoomBar.SetActive(true);
                break;
            case ActionBars.SpellBar:
                SpellBar.SetActive(true);
                break;
        }
    }
예제 #3
0
    public void SelectBar(ActionBars bar)
    {
        MainBar.SetActive(false);
        RoomBar.SetActive(false);
        SpellBar.SetActive(false);
        BackButton.SetActive(true);
        SettingButton.SetActive(true);

        switch (bar)
        {
        case ActionBars.MainBar:
            MainBar.SetActive(true);
            BackButton.SetActive(false);
            break;

        case ActionBars.RoomBar:
            RoomBar.SetActive(true);
            break;

        case ActionBars.SpellBar:
            SpellBar.SetActive(true);
            break;
        }
    }