Hey, I am trying to make it so that 1 is added to “Row” each time the function “ConvertParamsToClass” is called, but I don’t know how to do that. Can someone help me?
//Variables:
public List<KillFeedInfo> KFI = new List<KillFeedInfo>();
private void ConvertParamsToClass(string Killer, string Gun, string Killed)
{
int Row = 0;
Debug.Log ("Converting Params To Class");
KillFeedInfo k = new KillFeedInfo(Killer, Gun, Killed, Row);
KFI.Add(k);
foreach (KillFeedInfo k in KFI)
{
k.Row ++;
}
Debug.Log ("Added k");
}
}
[System.Serializable]
public class KillFeedInfo
{
public int Row;
public string Killer;
public string Gun;
public string Killed;
public KillFeedInfo(string K, string G, string V, int R)
{
Killer = K;
Gun = G;
Killed = V;
Row = R;
}
}