SuperJump() public method

public SuperJump ( float height ) : void
height float
return void
Beispiel #1
0
    public virtual void OnTriggerEnter(Collider col)
    {
        ThirdPersonController controller = (ThirdPersonController)col.GetComponent(typeof(ThirdPersonController));

        if (controller != null)
        {
            if (this.GetComponent <AudioSource>())
            {
                this.GetComponent <AudioSource>().Play();
            }
            controller.SuperJump(this.jumpHeight);
        }
    }
    public override void OnTriggerEnter(Collider col)
    {
        ThirdPersonController thirdPersonController = (ThirdPersonController)col.GetComponent(typeof(ThirdPersonController));

        if (thirdPersonController != null)
        {
            if (this.get_audio())
            {
                this.get_audio().Play();
            }
            thirdPersonController.SuperJump(this.jumpHeight);
        }
    }