Ejemplo n.º 1
0
    void FireHookAndRope()
    {
        // Shoot out a hook instance
        hook = (GameObject)Instantiate(hookFab, transform.position, transform.rotation);
        hook.GetComponent <Hook>().hookGun = this;

        //IgnoreHookPlayerCollisions();
        //ChangeState(HookshotState.EXTENDING);

        // And spawn a rope to go with it
        ropeObj       = (GameObject)Instantiate(ropeFab, transform.position, transform.rotation);
        rope          = ropeObj.GetComponent <RopeControl>();
        rope.hookshot = this;
        rope.hook     = hook;
    }
Ejemplo n.º 2
0
    void FireHookAndRope()
    {
        // Shoot out a hook instance
        hook = (GameObject)Instantiate(hookFab, transform.position, transform.rotation);
        hook.GetComponent<Hook>().hookGun = this;

        //IgnoreHookPlayerCollisions();
        //ChangeState(HookshotState.EXTENDING);

        // And spawn a rope to go with it
        ropeObj = (GameObject)Instantiate(ropeFab, transform.position, transform.rotation);
        rope = ropeObj.GetComponent<RopeControl>();
        rope.hookshot = this;
        rope.hook = hook;
    }