public void WallGrab()
 {
     if (CheckWall.med(transfrom.position))
     {
         ownerState.stateMachine.TransitionTo(ownerState.GetComponent <ClimbingState>());
         return;
     }
 }
 public void UpdateAct()
 {
     if (!CheckWall.med(ownerState.transform.position))
     {
         ownerState.stateMachine.TransitionTo(targ.GetState());
         rigid.velocity.Scale(new Vector2(0.2f, 1));
         return;
     }
 }
Example #3
0
    CheckWall filterWallCheck(Transform w)
    {
        CheckWall checkwall = null;

        Transform[] objs = w.GetComponentsInChildren <Transform>(true);

        foreach (Transform cw in objs)
        {
            /*if (cw.gameObject.activeSelf &&  cw.GetComponent<CheckWall>()!=null && cw.GetComponent<CheckWall>().checkersWall.Length>0)
             * {
             *  checkwall = cw.GetComponent<CheckWall>();
             * }*/
        }

        return(checkwall);
    }