Add travel map flow and update docs
This commit is contained in:
@@ -42,7 +42,7 @@ public class PlayerController : MonoBehaviour {
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
if(isDead)
|
||||
if(isDead || !GameFlowManager.IsGameplayActive)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -108,6 +108,11 @@ public class PlayerController : MonoBehaviour {
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other) {
|
||||
if(!GameFlowManager.IsGameplayActive)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(other.CompareTag("Dead") && !isDead)
|
||||
{
|
||||
if(other.gameObject.name == "DeadZone")
|
||||
@@ -163,6 +168,12 @@ public class PlayerController : MonoBehaviour {
|
||||
return;
|
||||
}
|
||||
|
||||
if(GameManager.instance != null && GameManager.instance.TryBlockDamageWithItem())
|
||||
{
|
||||
StartCoroutine(InvincibleRoutine());
|
||||
return;
|
||||
}
|
||||
|
||||
bool shouldDie = GameManager.instance.TakeDamage();
|
||||
|
||||
if(shouldDie)
|
||||
|
||||
Reference in New Issue
Block a user