private DivingGameController getDivingController() { if (divingController == null) { divingController = getPlayerGO().GetComponent <DivingGameController>(); } return(divingController); }
public void Update() { DivingGameController component = base.gameObject.GetComponent <DivingGameController>(); if (component != null) { component.DegradeRate = 0f; } }
private void RemoveDivingGameController() { if (!IsUnderWater) { DivingGameController component = base.gameObject.GetComponent <DivingGameController>(); component.RemoveLocalPlayerAirBubbleData(); Object.Destroy(component); Object.Destroy(base.gameObject.GetComponent <DivingGameObserver>()); } }
private void checkForDivingGameController(SwimControllerData data = null) { if (!(bool)base.gameObject.GetComponent <DivingGameController>()) { DivingGameController divingGameController = base.gameObject.AddComponent <DivingGameController>(); if (data != null) { divingGameController.SetData(data); } } }
private void Start() { divingController = getDivingController(); trayInputButton = GetComponentInParent <TrayInputButton>(); }