void Start() { playerEnableScript = GetComponent <PlayerEnable>(); if (GameManagerRefarences.NullCheck(playerEnableScript, "playerEnableScript")) { return; } playerHealthScript = GetComponent <PlayerHealth>(); if (GameManagerRefarences.NullCheck(playerHealthScript, "playerHealthScript")) { return; } playerHealthScript.EventDie += DisablePlayer; }
void Start() { playerEnableScript = GetComponent <PlayerEnable>(); if (GameManagerRefarences.NullCheck(playerEnableScript, "playerEnableScript")) { return; } playerHealthScript = GetComponent <PlayerHealth>(); if (GameManagerRefarences.NullCheck(playerHealthScript, "playerHealthScript")) { return; } playerHealthScript.EventRespawn += EnablePlayer; SetRespawnButton(); }