Files
PuzzleColorBall/Assets/Scripts/portal.cs

22 lines
447 B
C#
Raw Normal View History

2023-05-13 15:30:19 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class portal : MonoBehaviour
{
private GroundController gc;
// Start is called before the first frame update
void Awake()
{
gc = FindObjectOfType<GroundController>();
}
private void OnTriggerEnter(Collider other)
{
2023-05-16 14:27:55 +02:00
if(other.gameObject.tag.Equals("Player")){
gc.changeMaterialIndex();
}
2023-05-13 15:30:19 +02:00
}
}