private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.name == "Player") { trap.Active(); } }
public static void Action(int rowIndex, int colIndex) { char ch = Map.Data[rowIndex, colIndex]; if (ch == Bonus.Char) { Bonus.Active(); } else if (ch == Trap.Char) { Trap.Active(); } else if (ch == Points.Char) { Points.Get(); } else { Mine.Verification(rowIndex, colIndex); } }