コード例 #1
0
    /// <summary>
    /// Does the move.
    /// </summary>
    void DoMove()
    {
        if (grid.HasPath)
        {
            // selectedUnit.Location = currentCell;
            SoundManager.instance.PlayRandomVoiceline(walkingVoicelines);
            selectedUnit.Travel(grid.GetPath());
            // uppfæra cooldown á kall sem var að hreyfast
            selectedUnit.CurrentCooldown = turn;

            grid.ClearTilesInRange();
            grid.ClearPath();
            grid.ClearAttackableTiles();
            selectedUnit = null;
            text.ClearTextBox();
        }
    }