void CallElevator() { elevator.CallToStop(stopIndex); // Play 'ding' sound audioSource.Play(); // Show 'platform called!' alert Instantiate(platformCalledAlertPrefab, (Vector2)transform.position + PLATFORM_CALLED_ALERT_OFFSET, Quaternion.identity) // And set this call field as it's parent in the hierarchy .transform.SetParent(transform); }
void CallElevator() { elevator.CallToStop(stopIndex); }