コード例 #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);
        }
    }