public void React() { Wandering behavior = GetComponent <Wandering>(); if (behavior != null) { behavior.setAlive(false); } StartCoroutine(Die()); }
private void OnEnable() { Wandering behavior = GetComponent <Wandering>(); behavior.setAlive(true); }