Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        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();
            }
        }