init
This commit is contained in:
commit
862afc9b7a
478 changed files with 197737 additions and 0 deletions
23
Assets/Scripts/Spikes.cs
Normal file
23
Assets/Scripts/Spikes.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Spikes : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
private void OnCollisionEnter2D(Collision2D collision)
|
||||
{
|
||||
if (collision.transform.tag == "Player")
|
||||
collision.transform.GetComponent<PlayerStats>().Die();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue