initial second level
This commit is contained in:
1 parent
be3defc280
commit
e51b34784c
18 files changed
+24668
-13
No files matched your search
@@ -0,0 +1,20 @@
|
||||
using Code.DI;
|
||||
using Code.Gameplay.Player;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.Gameplay
|
||||
{
|
||||
public class EndBorderFirst : MonoBehaviour
|
||||
{
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if (!other.CompareTag("Player")) return;
|
||||
|
||||
FindFirstObjectByType<DIContainer>().Resolve<IHealthContainer>().Health =
|
||||
FindFirstObjectByType<PlayerHealth>().CurrentHealth;
|
||||
|
||||
SceneManager.LoadScene("Gameplay2");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user