FIIIIIREEEEE

This commit is contained in:
2023-06-28 13:38:48 +03:00
parent 79c870b6fa
commit c79d2a6b49
25 changed files with 1415 additions and 1798 deletions
+21
View File
@@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hammer : MonoBehaviour
{
private float _life = 3;
private void Awake()
{
Destroy(gameObject, _life);
}
private void OnCollisionEnter2D(Collision2D collision)
{
var player = collision.collider.GetComponent<Player>();
if (player == null)
{
Destroy(gameObject);
}
}
}