// Start is called before the first frame update private void OnTriggerEnter(Collider other) { if (other.tag == "Laser") { Debug.Log("Hit"); switch (state) { case BodypartState.NEUTRAL: neutralEvent.Invoke(); state = BodypartState.STEEL; break; case BodypartState.STEEL: steelEvent.Invoke(); break; case BodypartState.VULNERABLE: vulnerableEvent.Invoke(); break; } Destroy(other.gameObject); } }
public void steelize() { state = BodypartState.STEEL; }