private void ApplyRemote(bool show) { if (show != netBody.isVisible) { netBody.SetVisible(show); } }
private void SetVisible(GameObject pipe, bool visible) { NetBody component = pipe.GetComponent <NetBody>(); if ((bool)component) { component.SetVisible(visible); } }
public void ResetState(int checkpoint, int subObjectives) { NetBody component = GetComponent <NetBody>(); if ((bool)component) { component.SetVisible(activeOnReset); } else { base.gameObject.SetActive(activeOnReset); } }
private void DoDestroyIngredient(int itemIndex, int childIndex) { GameObject item = items[itemIndex].item; GameObject gameObject = (childIndex >= 0) ? item.transform.GetChild(childIndex).gameObject : item; NetBody component = gameObject.GetComponent <NetBody>(); if ((bool)component) { component.SetVisible(visible: false); } else { gameObject.SetActive(value: false); } }