コード例 #1
0
ファイル: BattleUI.cs プロジェクト: LordAbver/hexagon
    void DoHover()
    {
        UpdateCurrentCell();
        if (_currentCell)
        {
            ShowTerrainType();
            grid.HighlightCell(_currentCell);

            if (_selectedUnit && _selectedUnit.ActPhase == ActPhase.WaitForCommand)
            {
                _direction = grid.SelectedCell.Coordinates.GetRelatedDirection(_currentCell.Coordinates);
                _selectedUnit.Rotate(_direction);
            }

            Cursor.SetCursor(CursorTexture, Vector2.zero, CursorMode.Auto);
        }
        else
        {
            Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
        }
    }