SLEAPY_SMURF/Assets/Scripts/Lvl2.cs

33 lines
710 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Lvl2 : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
//if (new collision.gameObject.tag == "player")
// collision.gameObject.GetComponent<player>().Surm();
}
public void OnTriggerEnter(Collider other)
{
if (other.tag == "player")
{
ViiTeisseLevelisse(other.gameObject);
}
}
public void ViiTeisseLevelisse(GameObject player)
{
player.transform.position = new Vector3(-47.32f, 1144.72f, 3612.7f);
}
}