Exemplo n.º 1
0
    void ConnectToOwner()
    {
        ownerPlayer = PlayerManager.Inst.Get(owner);
        ropeSource = PlayerManager.Inst.Get(owner);

        ropeSJ = gameObject.AddComponent<SpringJoint2D>();
        ropeSJ.connectedBody = ownerPlayer.GetComponent<Rigidbody2D>();
        ropeSJ.distance = 5f;
        ropeSJ.frequency = 2;
        ropeSJ.dampingRatio = 1;

        ownerPlayer.RopeFired(this);
    }