private void OnTriggerEnter(Collider collider) { PlatformBehavior plat; if (plat = collider.GetComponent <PlatformBehavior>()) { env.FlagForRespawn(plat); } }