- Home /
Question by
collederas · Aug 22, 2012 at 08:41 PM ·
delegate
what is a delegate? and how does it works specifically in the burgzerg tutorial?
`targets.Sort(delegate(Transform t1, Transform t2) { return Vector3.Distance(t1.position, myTranform.position).CompareTo(Vector3.Distance(t2.position, myTransform.position));`
i now it's used to make callbacks but in this specific case..what does it? Thank you if you will help me.
Bye!
Comment
Your answer
Follow this Question
Related Questions
Best approach to a interaction management system 1 Answer
When attempting to call a method from within another script I get this error. 3 Answers
How can i use 4.6 delegate lists in my scripts ? 1 Answer
Delegate.Target null-check fails when it's actually null and also prints as null. 1 Answer
Is it possible to check if something is in a delegate? 1 Answer