public void ToggleBossPlacement() { if (tapToPlaceParent == null) { tapToPlaceParent = starGameManagerRef.FinalBossPlacementObject; } tapToPlaceParent.DoSelectMode(); // print("TOGGLE TTP"); // maybe unfade here? starGameManagerRef.localSceneManagement.FinalBossPlacementObject.gameObject.GetComponent <Animator>().SetBool("dim", false); }
public void StartPlacing() { TapToPlaceParent tapToPlace = gameObject.GetComponentInChildren <TapToPlaceParent>(); if (tapToPlace == null) { Debug.LogErrorFormat("current gameobject '{0}' does not support the enabling/disabling of the placing box", gameObject.name); return; } //ensure placing is allowed tapToPlace.AllowPlacing(); tapToPlace.TogglePlacing(); }
private void UpdateDeviceIdForTapToPlace() { if (DeviceId == null) { Debug.LogError("cant update TapToPlaceParent.DeviceId with value 'null'"); return; } TapToPlaceParent tapToPlace = gameObject.GetComponentInChildren <TapToPlaceParent>(); if (tapToPlace == null) { Debug.LogError("tap to place behavior not found"); return; } tapToPlace.DeviceId = DeviceId; }
public void EnablePlacingBox(bool enable) { TapToPlaceParent tapToPlace = gameObject.GetComponentInChildren <TapToPlaceParent>(); if (tapToPlace == null) { Debug.LogErrorFormat("current gameobject '{0}' does not support the enabling/disabling of the placing box", gameObject.name); return; } if (enable) { tapToPlace.AllowPlacing(); } else { tapToPlace.DisallowPlacing(); } }