I did a game but at the end I encountered a problem. I have two classes that perform certain transformations on the game.
I want when I type on a round cell to tell me a Debug.Log that the number odd or even;
Below is the event created for each cell
private void GetValue(GameObject target, MouseEventType type)
{
if (type == MouseEventType.CLICK)
{
int targetIndex = System.Array.IndexOf(molecula.atom, target);
if( molecula.atom[targetIndex].GetNumber() % 2 == 1)
{
Debug.Log("God Click");
}
else
{
Debug.Log("Bad Click");
}
}
}
Now that I type on a cell I get the error below
If anyone can tell me what I'm wrong with?