Method Group
What is a method group and how can I use it?
FRef.cs:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FRef : MonoBehaviour {
string player_n;
public List<Prop> p = new List<Prop>();
int idx;
void Start()
{
idx = p.FindIndex(IsAlive);
Debug.Log(p[idx].name);
}
bool IsAlive(Prop stats)
{
return stats.health == 100;
}
}
And classes.cs:
using UnityEngine;
using System.Collections;
using System;
public class Classes {
}
[Serializable]
public class Prop
{
public string name;
public int health;
}
Is it something like this? If so, where can I find documentation about it?
Comment
Best Answer
Answer by hexagonius · Feb 23, 2017 at 07:09 AM
the first accepted answer here describes it:
http://stackoverflow.com/questions/886822/what-is-a-method-group-in-c
Your answer
Follow this Question
Related Questions
List.FindIndex 1 Answer
Technically Match 3 but not really 0 Answers
How do GameObjects detect void Update and how to make my custom one. 0 Answers
Difference between C# Invoke and Unity Invoke 0 Answers
call any method 1 Answer