I'm new at C# and Unity and reading the Manual and encountered a foreign colon syntax in some examples:
function Choose(probs: float[]) {
var total = 0;
for (elem in probs) {
total += elem;
}
var spawnPoints: Transform[];
function ChooseSet(numRequired: int) {
var result = new Transform[numRequired];
It's from Random Numbers Unity3d Manual
I found this question: Multiple Meanings of : in c#
But no one of the examples in this question seems to fit.
I think, it's a kind of type definition... but normally it would be
public Transform[] spawnPoints;
instead of
var spawnPoints: Transform[];
so I'm a little bit confused.