Пример #1
0
    public override bool Contact(BoxBehaviour from, BoxBehaviour to)
    {
        to.IdentifyBox();

        to.animator.SetTrigger("Rotate");
        if (from == to)
        {
            InitKillers(to);
            return(true);
        }
        return(false);
    }
Пример #2
0
    public override bool Contact(BoxBehaviour from, BoxBehaviour to)
    {
        if (from == to)
        {
            to.animator.SetTrigger("Shake");
            to.source.PlayOneShot(blockSound);

            return(false);
        }
        if (score > 0)
        {
            to.source.PlayOneShot(triggerSound);
            to.particle.Play();
            UiManager.Instance.CreateCoin(new Vector3(to.transform.position.x, to.transform.position.y, to.transform.position.z - 5));
        }
        to.IdentifyBox();
        to.animator.SetTrigger("Rotate");
        return(true);
    }
Пример #3
0
    public override bool Contact(BoxBehaviour from, BoxBehaviour to)
    {
        if (from.lastStats is ChainBreakerValue)
        {
            to.animator.SetTrigger("Rotate");
            to.IdentifyBox();
        }
        else
        {
            to.animator.SetTrigger("Shake");
            to.source.PlayOneShot(blockSound);
            to.FinishAnimation();
        }

        if (from == to)
        {
            return(false);
        }
        return(true);
    }