/// <summary> /// A method that sends certain pieces of information to the InfoPanel, based on which BuyPanel the button is in /// </summary> public void OnClick() { switch (type) { case ButtonType.Tower: infoPanel.RecieveTowerInfo(objName, description, cost, damage, rateOfFire, image); Debug.Log("Ok"); break; case ButtonType.Creature: infoPanel.RecieveCreatureInfo(objName, description, health, cost, damage, image); break; case ButtonType.Modifier: //InfoPanel.RecieveModifierInfo(); break; default: Debug.Log("No type assigned to this button"); break; } }