I have an int list with size 2. And inside this list have a value of
1 , 3
and an int array
0,1,2,3,4,5
How could I increas the value of array 1 and 3 to with the value of the int list?
Exemplifying what I was trying but it didn't work
for (int index = 0; index < list.Count; index++)
{
session.score_kills[index] += 3;
Debug.Log(index);
}
But this loop he puts the value in the int array
0,1,2
and not only 1,3 which is the list
aiming at the order (counting) of the list in ascending order
I also tried:
foreach (var x in list)
{
session.score_kills[x] += 3; Debug.Log(x)
}
but it is only in the list size and not in the int value inside it.
Sorry for the bad English, I'm trying my best to explain based on what I know of the language. I thank everyone who can help me, I'm still new. If any information is missing please let me know and excuse me beforehand I'm already 6 days in this problem and tired
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…