Ejemplo n.º 1
0
    private void TriggerWithKnife(InteractionScript script)
    {
        KnifeInteraction knife = script as KnifeInteraction;

        if (knife != null)
        {
            if (knife.KnifeState == KnifeInteraction.EKnifeState.Screwdriver)
            {
                if (!m_openState)
                {
                    LeanTween.moveLocal(gameObject, new Vector3(1.07f, -0.3f, 0f), 0.3f).setEaseInOutSine().setOnComplete((o =>
                    {
                        m_key.gameObject.SetActive(true);
                    }));
                    knife.SetOutLine(false);
                    knife.enabled = false;
                }
                else
                {
                    LeanTween.moveLocal(gameObject, new Vector3(0.24f, 0.09f, 0f), 0.3f).setEaseInOutSine().setOnComplete((o =>
                    {
                        m_key.gameObject.SetActive(false);
                        m_holeInteraction.m_isClose = true;
                    }));
                    knife.SetOutLine(false);
                    knife.enabled = false;
                }
            }
        }
    }
Ejemplo n.º 2
0
    private void TriggerWithKnife(InteractionScript script)
    {
        KnifeInteraction knife = script as KnifeInteraction;

        if (knife != null && knife.KnifeState == KnifeInteraction.EKnifeState.Knife)
        {
            m_render.sprite = m_bearOpen;

            m_book.gameObject.SetActive(true);
            LeanTween.moveX(m_book.gameObject, transform.position.x - 0.2f, 0.3f).setEaseInOutSine();
            LeanTween.moveY(m_book.gameObject, transform.position.y + 0.1f, 0.15f).setEaseInCirc();
            LeanTween.moveY(m_book.gameObject, transform.position.y - 0.1f, 0.15f).setEaseInCirc().setDelay(0.15f);
            m_canPick        = false;
            m_canShowOutline = false;
        }
    }