public void OnClick() { MapLocation location = GetComponentInParent <MapLocation>(); if (location) { location.ApplyBackground(); } if (!IsLocked()) { Level.LoadLevel(level); } }