示例#1
0
    // 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);
        }
    }
示例#2
0
 public void steelize()
 {
     state = BodypartState.STEEL;
 }