예제 #1
0
 // Update is called once per frame
 void Update()
 {
     if (BM1.grounded && BM2.sky)
     {
         BM2.activo = true;
         BM1.goUp();
     }
     if (BM1.sky && BM2.grounded)
     {
         BM1.activo = true;
         BM2.goUp();
     }
 }
예제 #2
0
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.transform.name == "piso")
        {
            BM.goUp();
            activo   = false;
            grounded = true;

            rb.useGravity  = false;
            rb.isKinematic = true;
        }
        if (collision.transform.name == "sky")
        {
            sky = true;
        }
    }