Beispiel #1
0
    public void DeeperAndDeeper()
    {
        slimeStatus = SlimeStatus.Deeper;

        AudioManager.GetInstance().PlayStatus(SlimeStatus.Deeper);

        SlimeIt();

        gameObject.SetActive(false);
    }
Beispiel #2
0
    public void Die()
    {
        slimeStatus = SlimeStatus.Dead;

        AudioManager.GetInstance().PlayStatus(SlimeStatus.Dead);

        animator.enabled = true;
        animator.speed   = 1.5f;
        animator.SetTrigger(SlimeAnimationBehaviour.animationDie);
    }
Beispiel #3
0
    public void Pause()
    {
        slimeStatus = SlimeStatus.Paused;

        m_rigidbody2D.Sleep();

        spriteRenderer.sprite = spriteScared;

        animator.enabled = true;
        animator.speed   = 1f;
        animator.SetTrigger(SlimeAnimationBehaviour.animationScared);
    }
Beispiel #4
0
    public void KeepWalking()
    {
        m_rigidbody2D.WakeUp();

        spriteRenderer.sprite = spriteDefault;

        animator.enabled = true;
        animator.speed   = 1f;
        animator.SetTrigger(SlimeAnimationBehaviour.animationWalking);

        slimeStatus = SlimeStatus.Default;
    }
Beispiel #5
0
    public void Fall(bool animate = true)
    {
        m_rigidbody2D.WakeUp();

        if (animate)
        {
            spriteRenderer.sprite = spriteFall;

            animator.speed   = 0f;
            animator.enabled = false;
        }

        slimeStatus = SlimeStatus.InAir;
    }
Beispiel #6
0
    public void Use(AbilitySwap.AbilityType abilityType)
    {
        if (abilityType == AbilitySwap.AbilityType.Horn)
        {
            slimeStatus = SlimeStatus.Paused;

            animator.SetTrigger(SlimeAnimationBehaviour.animationHorn);

            AudioManager.GetInstance().PlayAbility(AbilitySwap.AbilityType.Horn);
        }
        else
        {
            slimeStatus = SlimeStatus.Used;

            animator.SetTrigger(SlimeAnimationBehaviour.animationCraft);

            AudioManager.GetInstance().PlayStatus(SlimeStatus.Used);

            SlimeIt();
        }
    }