literally half of the game
This commit is contained in:
parent
1590b5faa6
commit
b842289076
77 changed files with 11904 additions and 72 deletions
21
Assets/Scripts/ZonePlayerFlagCollision.cs
Normal file
21
Assets/Scripts/ZonePlayerFlagCollision.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class ZonePlayerFlagCollision : MonoBehaviour
|
||||
{
|
||||
public bool safeZone;
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if (other.TryGetComponent(out Player isPlayer))
|
||||
{
|
||||
if (safeZone)
|
||||
{
|
||||
isPlayer.isSafe = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
isPlayer.isSafe = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue