Exemplo n.º 1
0
    // void OnTriggerEnter2D (Collider2D other)
    // {
    //  if (other.tag == "Exit")
    //  {
    //      m_gameManager.ExitReached ();
    //      if (endReachedEvent != null)
    //      {
    //          endReachedEvent.Invoke ();
    //      }
    //  }
    // }

    void ToggleGUIActions(bool interactable)
    {
        leftButton.GetComponentInParent <Button> ().interactable    = interactable;
        rightButton.GetComponentInParent <Button> ().interactable   = interactable;
        upButton.GetComponentInParent <Button> ().interactable      = interactable;
        downButton.GetComponentInParent <Button> ().interactable    = interactable;
        undoButton.GetComponentInParent <Button> ().interactable    = interactable;
        restartButton.GetComponentInParent <Button> ().interactable = interactable;
    }
Exemplo n.º 2
0
        protected TextRevealBehaviour(MaskableGraphic graphic, bool slideClipRect, bool rightToLeft, float fadeWidth)
        {
            this.graphic       = graphic;
            this.slideClipRect = slideClipRect;
            this.rightToLeft   = rightToLeft;
            this.fadeWidth     = fadeWidth;

            var printerPanel = graphic.GetComponentInParent <UITextPrinterPanel>();

            if (printerPanel)
            {
                contentTransform = printerPanel.Content;
            }

            positionLastFrame = graphic.transform.position;
        }