public void SetEnable(EnableOption option) { if (isDestroyed) { return; } switch (option) { case EnableOption.enable: isActive = true; if (useAsRoute) { foreach (Transform child in transform) { if (child.GetComponent <SelectManager>() == null) { continue; } child.GetComponent <SelectManager>().ExecuteSelect(); } } break; case EnableOption.disable: isActive = false; break; case EnableOption.erase: isActive = false; isDestroyed = true; baseSprite = null; break; } }
public void SetEnable(EnableOption option) { switch (option) { case EnableOption.enable: isActive = true; break; case EnableOption.disable: isActive = false; break; case EnableOption.erase: transform.parent.GetComponent <CrimeObject>().selectList.Remove(this); Destroy(gameObject); break; } }
public void SetEnable(EnableOption option) { if (isDestroyed) return; switch (option) { case EnableOption.enable: isActive = true; if (useAsRoute) foreach (Transform child in transform) { if (child.GetComponent<SelectManager>() == null) continue; child.GetComponent<SelectManager>().ExecuteSelect(); } break; case EnableOption.disable: isActive = false; break; case EnableOption.erase: isActive = false; isDestroyed = true; baseSprite = null; break; } }