Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        text = this.gameObject.GetComponent <TextMeshProUGUI>();
        TouchInputManager touchInputManager = TouchInputManager.getInstance();

        touchInputManager.SubscribeSwipeListener(this, 0);
        touchInputManager.SubscribeTapListener(this, 0);
        touchInputManager.SubscribeDragListener(this, 0);
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     touchInputManager = TouchInputManager.getInstance();
     if (touchInputManager == null)
     {
         Debug.LogError("Touch Movable Error: There is no TouchInputManager!");
         Destroy(this.gameObject);
     }
     else
     {
         rigidBody = this.gameObject.GetComponent <Rigidbody2D>();
         //touchInputManager.subscribeTouchMovement(this, touchToFollow);
     }
 }
Ejemplo n.º 3
0
 private void Start()
 {
     if (playerAvatar == null)
     {
         Debug.LogError("Player Avatar is null!");
         Destroy(this.gameObject);
     }
     else
     {
         playerTouchMovable = playerAvatar.GetComponent <TouchMovable>();
         if (playerTouchMovable == null)
         {
             Debug.LogError("Player Avatar has no touch movable!");
             Destroy(this.gameObject);
         }
         TouchInputManager.getInstance().SubscribeTapListener(this, 0);
         dayCountdown.text = "Days until performance: " + (daysTillPerformance - (daysSoFar % daysTillPerformance));
         pm = playerAvatar.GetComponent <PlayerManager>();
         dr = FindObjectOfType <DialogueRunner>();
     }
 }
Ejemplo n.º 4
0
 void Start()
 {
     followedBy          = null;
     isFollowed          = false;
     nearbyInteractables = new Collider2D[0];
     touchInputManager   = TouchInputManager.getInstance();
     if (touchInputManager == null)
     {
         Debug.LogError("Touch Movable Error: There is no TouchInputManager!");
         Destroy(this.gameObject);
     }
     else if (tapCollider == null || (tapColliderRB = tapCollider.GetComponent <BoxCollider2D>()) == null)
     {
         Debug.LogError("Touch Movable Error: There is no Tap Box Collider!");
         Destroy(this.gameObject);
     }
     else
     {
         da_Rigidbody = this.gameObject.GetComponent <Rigidbody2D>();
         ToggleMovement(true);
     }
 }
    void Start()
    {
        donnaManager.gameObject.SetActive(duoTrapeze);
        if (gradedPerformance)
        {
            timerText.gameObject.SetActive(true);
            exitBtn.SetActive(false);
        }
        duoTrapeze = false;
        TouchInputManager t = TouchInputManager.getInstance();

        if (t == null)
        {
            Destroy(this);
        }
        trickGUI = TrickGUI.GetInstance();
        t.SubscribeTapListener(this, 0);
        t.SubscribeSwipeListener(this, 0);
        if (playerAvatar == null)
        {
            Debug.Log("Player Avatar is null");
            Destroy(this);
        }
        pmt = playerAvatar.GetComponent <PlayerManager_Trapeze>();
        if (pmt == null)
        {
            Debug.Log("Player Avatar is missing PlayerManager_Trapeze script");
            Destroy(this);
        }
        if (scriptToLoad != null)
        {
            dialogueRunner.Add(scriptToLoad);
        }
        if (canTutorial)
        {
            tutorialManager.SetActive(true);
        }
    }