예제 #1
0
    private void ChangeCursor(CursorsType newcursor)
    {
        if (newcursor == CursorsType.Hide)
        {
            Cursor.visible = false;
        }
        else
        {
            Cursor.visible = true;
        }

        switch (newcursor)
        {
        case CursorsType.Default:
            Vector2 offset = new Vector2(20, 0);
            Cursor.SetCursor(noneTxr, offset, CursorMode.Auto);
            break;

        case CursorsType.Wait:
            Cursor.SetCursor(waitTxr, Vector2.zero, CursorMode.Auto);
            break;

        case CursorsType.Skill:
            Cursor.SetCursor(skillTxr, Vector2.zero, CursorMode.Auto);
            break;
        }
    }
예제 #2
0
 private void Deselect()
 {
     entityController.UnselectUints();
     player.HideActionButtons();
     player.HideUnitIcon();
     player.HideBuildDescription();
     player.HideUnitDescription();
     cursorsType = CursorsType.Simple;
 }
예제 #3
0
    public void SetCursor( CursorsType type)
    {
        cursorsType = type;

        switch ( cursorsType ) {
            case CursorsType.Simple:
                cursor.SetMoveCursor();
                break;
            default:
                cursor.SetMagicCursor();
                break;
        }
    }
예제 #4
0
    void Update()
    {
        GetSelectableUnits(selelectionBox.SelectionBoxArea());

        if ( Input.GetMouseButtonDown( 0 ) ) {
            if ( UnityEngine.EventSystems.EventSystem.current.IsPointerOverGameObject() ) {
                return;
            }
            SelectClick();
        }
        if ( Input.GetMouseButtonDown( 1 ) ) {
            cursorsType = CursorsType.Simple;
            SetTargetByClick();
        }
    }
예제 #5
0
 public void DisplayMousePointer(TurnState state, CursorsType cursorType)
 {
     BattleManager.GetMouseCursorMgr.CurrentCursor = (CurrentTurnState == state) ? cursorType : CursorsType.Default;
 }
예제 #6
0
 // Use this for initialization
 void Start()
 {
     CurrentCursor    = CursorsType.Default;
     playerController = BattleManager.GetPlayerController;
 }