Would anyone be able to explain the approach of creating a list in this function within the SpinAction script? I’ve never seen, nor used this way before.
public override List<GridPosition> GetValidActionGridPositionList()
{
GridPosition unitGridPosition = unit.GetGridPosition();
return new List<GridPosition>
{
unitGridPosition
};
}
Am I right in thinking that it’s another form of:
listName.Add(value);
Any help would be appreciated, and I apologise if this is such a basic thing.