public void Click() { switch (name) { case "MarkAs": MarkCellAsMananger?.Click(); break; } }
public void CallTheRelatedManagerForThisClick(GameObject clicked) { CellSpriteManager cellSpriteManager = clicked.GetComponent <CellSpriteManager>(); cellSpriteManager?.Click(); if (cellSpriteManager != null) { return; } MainMenu mainMenu = clicked.GetComponent <MainMenu>(); mainMenu?.Click(); if (mainMenu != null) { return; } MarkCellAsMananger markCell = clicked.GetComponent <MarkCellAsMananger>(); markCell?.Click(); }