コード例 #1
0
    public void PlugIn()
    {
        GetComponent <AudioSource>().PlayOneShot(plugInSound);

        grabbed  = false;
        inSocket = true;

        InteractingSocket.PlugIn(this);


        transform.rotation = Quaternion.identity;
        transform.position = InteractingSocket.transform.position - anchor.localPosition;
        GetComponent <Rigidbody2D>().velocity        = Vector2.zero;
        GetComponent <Rigidbody2D>().angularVelocity = 0f;
        pluggedInSprite.gameObject.SetActive(true);
        defaultSprite.gameObject.SetActive(false);
        Dangle(false);

        if (solver != null)
        {
            solver.SolveExpression();
        }
    }