Hi all,
Pretty basic programming question here, but one I haven’t found a great answer to.
In this lecture, Nathan uses {get;} to access the SelectedUnits list, which he makes public (UnitSelectionHandler.cs). Then he writes a method GetUnitMovement() to return unitMovement (Unit.cs).
I’m familiar with both methods, but what’s the reasoning behind choosing one over the other? I tend to avoid implementing public variables with {get; set;} mostly because I don’t understand the structure well.