Causality meets resource theory