예제 #1
0
파일: hookshot.cs 프로젝트: OliAe/LeapsVR
 private void Awake()
 {
     rigidBody        = GetComponent <Rigidbody>();
     playercontroller = GetComponent <RIGbodyMOVE>();
     hookshotTransform.gameObject.SetActive(false);
     state = State.Normal;
 }
예제 #2
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            Pickup(other);
        }

        void Pickup(Collider player)
        {
            RIGbodyMOVE antiG = player.GetComponent <RIGbodyMOVE>();

            antiG.gravity   += antigravity;
            antiG.jumpSpeed += jumpspeed;
            antiG.antispeed += antiGSpeed;
        }
    }
예제 #3
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            Pickup(other);
        }

        void Pickup(Collider player)
        {
            RIGbodyMOVE leap = player.GetComponent <RIGbodyMOVE>();

            leap.MAXJUMP += jumps;


            Destroy(gameObject);
        }
    }