Ejemplo n.º 1
0
 private void OnTriggerStay(Collider other)
 {
     if (!characterStatus.onWall)
     {
         if (other.tag.Equals("Helper"))
         {
             if (!characterStatus.isGround && !fall)
             {
                 ClimbStarter starter;
                 if (MyGetComponent(other.gameObject, out starter))
                 {
                     Vector3 dir = starter.point.transform.position - transform.position;
                     dir.y = 0;
                     if (Vector3.Angle(transform.forward, dir) < 100)
                     {
                         key = true;
                         characterInventory.DestroyWeapon();
                         characterInventory.SelectWeaponAction(3);
                         currentPoint           = starter.point;
                         transform.parent       = currentPoint.transform;
                         characterStatus.onWall = true;
                         currentSpeed           = speed;
                         move = 1;
                         anim.SetFloat("JumpLeg", 0);
                         anim.SetBool("OnGround", false);
                         anim.SetBool("OnWall", true);
                         transform.rotation = currentPoint.transform.rotation;
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void SelectWeapon()
 {
     characterInventory.DestroyWeapon();
     characterInventory.SelectWeaponAction(selectedWeapon);
 }