Answer the question
In order to leave comments, you need to log in
Invalid token = is class. struct, or interface member declaretion what to do?
I was writing the target code for the tower and this error appeared:
Here is the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TowerTrigger : MonoBehaviour
{
public Tower twr;
public bool lockE;
public GameObject curTarget;
void OnTriggerEnter(Collider other)
{
if (other.CompareTag("enemyCube") && !lockE)
{
twr.target = other.gameObject.transform;
curTarget = other.gameObject;
lockE = true;
}
}
void OnTriggerExit(Collider other)
{
if (other.CompareTag("enemyCube") && other.gameObject == curTarget) ;
}
lockE = false;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question