This commit is contained in:
brausjonas
2022-10-17 23:53:04 +02:00
parent ec6cac7581
commit efaa2ced59
1442 changed files with 196305 additions and 24 deletions
@@ -0,0 +1,17 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Saw : MonoBehaviour
{
private void OnCollisionEnter2D(Collision2D col)
{
Player player;
if ((player = col.gameObject.GetComponent<Player>()) == true)
{
player.TakeDamage(1);
}
}
}