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; } }
private void Deselect() { entityController.UnselectUints(); player.HideActionButtons(); player.HideUnitIcon(); player.HideBuildDescription(); player.HideUnitDescription(); cursorsType = CursorsType.Simple; }
public void SetCursor( CursorsType type) { cursorsType = type; switch ( cursorsType ) { case CursorsType.Simple: cursor.SetMoveCursor(); break; default: cursor.SetMagicCursor(); break; } }
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(); } }
public void DisplayMousePointer(TurnState state, CursorsType cursorType) { BattleManager.GetMouseCursorMgr.CurrentCursor = (CurrentTurnState == state) ? cursorType : CursorsType.Default; }
// Use this for initialization void Start() { CurrentCursor = CursorsType.Default; playerController = BattleManager.GetPlayerController; }