2023-06-22 16:59:42 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class NoShift : MonoBehaviour
|
|
|
|
{
|
|
|
|
|
|
|
|
private DimShift dimshift;
|
|
|
|
// Start is called before the first frame update
|
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
dimshift = GameObject.Find("Frank").GetComponent<DimShift>();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnTriggerEnter2D(Collider2D col)
|
|
|
|
{
|
|
|
|
if(col.CompareTag("Player"))
|
|
|
|
{
|
2023-06-29 13:16:27 +02:00
|
|
|
dimshift.shiftingEnabled = false;
|
2023-06-22 16:59:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnTriggerExit2D(Collider2D col)
|
|
|
|
{
|
|
|
|
if(col.CompareTag("Player"))
|
|
|
|
{
|
2023-06-29 13:16:27 +02:00
|
|
|
dimshift.shiftingEnabled = true;
|
2023-06-22 16:59:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|