Files
Slendytubbies-VR/Assets/Scripts/Enemy/DummyWinky.cs
T
2026-10-11 20:26:48 +02:00

35 lines
717 B
C#

using NUnit.Framework;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.AI;
public class DummyWinky : MonoBehaviour
{
public static DummyWinky Instance;
private void Awake()
{
Instance = this;
}
public bool unleashed = false;
public void Unleash()
{
unleashed = true;
}
private void Update()
{
if (unleashed)
{
Vector3 normalized2 = (this.transform.position - Player.Instance.Camera.transform.position).normalized;
this.transform.localScale += Vector3.one * Time.deltaTime;
this.transform.LookAt(Player.Instance.transform.position);
this.transform.position -= normalized2 * Time.deltaTime * 3;
}
}
}