Ejemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("Player") && currentBubble == null && !blockAnimPlaying)
     {
         blockAnimPlaying = true;
         player.setCutsceneMode(true);
         StartCoroutine(waitForBlockAnimation());
     }
 }
Ejemplo n.º 2
0
    IEnumerator delayPlayerControl()
    {
        player.setCutsceneMode(true);
        player.disableAngledControls = true;
        Rigidbody playerRigidbody = playerObject.GetComponent <Rigidbody>();

        input.direction = Vector2.ClampMagnitude(new Vector2(playerRigidbody.velocity.x, playerRigidbody.velocity.z), 1);

        yield return(new WaitForSeconds(playerControlDelay));

        player.disableAngledControls = false;
        player.setCutsceneMode(false);
    }
Ejemplo n.º 3
0
    public void openMenu()
    {
        foreach (MenuPage p in pages)
        {
            p.gameObject.SetActive(false);
        }
        pages[0].gameObject.SetActive(true);

        gameObject.SetActive(true);
        tabCursor.GetComponent <Cursor>().setActivityStatus(true);
        player.setCutsceneMode(true);
        player.art.animator.SetFloat("normalizedSpeed", 0);
        player.art.animator.SetFloat("side", 0);
    }
Ejemplo n.º 4
0
 private void resultBubbleClose()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMachine>();
     player.setCutsceneMode(false);
     player.setFrozenStatus(false);
     StartCoroutine(waitBeforeEnablingJump());
 }
Ejemplo n.º 5
0
 void bubbleClosed()
 {
     if (bubbleClosedEvent != null)
     {
         bubbleClosedEvent.Invoke(gameObject, null);
     }
     player.setCutsceneMode(false);
 }
Ejemplo n.º 6
0
 void LateUpdate()
 {
     if (player.gameManager.inputManager.isInputDown[4] || player.gameManager.inputManager.isInputDown[5])
     {
         foreach (Animator a in animators)
         {
             a.SetTrigger("Close");
         }
         player.setCutsceneMode(false);
         player.setFrozenStatus(false);
         player.art.animator.SetBool("ItemGet", false);
         Destroy(popup.gameObject, destructionDelay);
         Destroy(gameObject, destructionDelay);
     }
 }
Ejemplo n.º 7
0
    public override void interact(GameObject playerObject)
    {
        base.interact(playerObject);
        if (currentBubble == null)
        {
            player = playerObject.GetComponent <PlayerMachine>();
            GameObject bubble = Instantiate(speechBubble, player.gameManager.uiParent);
            Typewriter writer = bubble.GetComponent <Typewriter>();

            writer.talkSound           = talkSound;
            writer.skipSound           = skipSound;
            writer.OnPageFinished     += pageFinished;
            writer.OnBubbleClosed     += bubbleClosed;
            writer.bubbleImage.color   = bubbleTint;
            writer.textComponent.color = textTint;
            writer.startWriting(text);
            currentBubble = bubble;
            player.setCutsceneMode(true);
        }
    }
Ejemplo n.º 8
0
    public void startPopup(BaseItem itemType, PlayerMachine player)
    {
        this.player = player;
        item        = itemType;

        player.setCutsceneMode(true);
        player.setFrozenStatus(true);

        if (itemType.name.StartsWith("A") || itemType.name.StartsWith("E") || itemType.name.StartsWith("I") || itemType.name.StartsWith("O") || itemType.name.StartsWith("U"))
        {
            nameText.text = "You got an <color=red>" + itemType.itemName + "</color>!";
        }
        else
        {
            nameText.text = "You got a <color=red>" + itemType.itemName + "</color>!";
        }

        descText.text = itemType.description;

        popup = Instantiate(iconPopup, player.transform).GetComponent <ItemIconPopup>();
        animators.Add(popup.gameObject.GetComponent <Animator>());
        popup.show(item.icon);
    }