コード例 #1
0
    public void breakRopeNow() // called when a correct answer is Tapped
    {
        pickAllJointsFromRope();
        if (_hangingObjectText != null)
        {
            _hangingObjectText.SetActive(false);
        }
        _brokenRopeObjects = (NF_BrokenRopeObjects)_newParent.GetComponent <NF_BrokenRopeObjects>();
        _brokenRopeObjects.sendBrokenRopeArray(brokenRopeObj, _newParentPosition);

        // create rope up animation sprite here

        ropeCutUp = Instantiate(Resources.Load(NF_Constants._ropeCutUpPath, typeof(GameObject)),
                                new Vector3(this.transform.position.x, this.transform.position.y - 40, this.transform.position.z), Quaternion.identity) as GameObject;

        Destroy(this.gameObject);
        Debug.Log("Rope Destroyed");
    }
コード例 #2
0
    public void breakRopeNow()
    {
        // called when a correct answer is Tapped

        pickAllJointsFromRope();
        if(_hangingObjectText!=null){
            _hangingObjectText.SetActive(false);
        }
        _brokenRopeObjects = (NF_BrokenRopeObjects) _newParent.GetComponent<NF_BrokenRopeObjects>();
        _brokenRopeObjects.sendBrokenRopeArray(brokenRopeObj,_newParentPosition);

        // create rope up animation sprite here

        ropeCutUp = Instantiate(Resources.Load(NF_Constants._ropeCutUpPath, typeof(GameObject)),
            new Vector3(this.transform.position.x,this.transform.position.y-40,this.transform.position.z),Quaternion.identity) as GameObject;

        Destroy(this.gameObject);
        Debug.Log("Rope Destroyed");
    }