SLEAPY_SMURF/Assets/Scripts/pahalane.cs

32 lines
563 B
C#
Raw Normal View History

2023-04-29 20:13:37 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class pahalane : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.position += new Vector3(-20, 0) * Time.deltaTime;
}
private void OnTriggerEnter(Collider collision)
{
if (collision.gameObject.tag == "player")
{
collision.gameObject.GetComponent<player>().Surm();
}
}
}