Exemplo n.º 1
0
 // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
 override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     roboticWall.wallToTarget_controller.Robot_Move_Switch(false);
     //reset obstacle avoidance module
     animator.gameObject.GetComponent <Obstacle_Avoid>().enabled = true;
     //release the wall the door settle in
     wall_requester.ReleaseWall(animator.GetBehaviour <Wall_State>().GetWall());
     //animator.GetBehaviour<DoorState>().SetDoor(frame.transform.GetChild(0).gameObject);
 }
Exemplo n.º 2
0
    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        roboticWall.wallToTarget_controller.Robot_Move_Switch(false);
        //if next state is door state, keep the target wall in sloved list, else release the target wall
        Debug.Log("slider enter ele =" + animator.GetBool("SlideEnterElevator"));
        if (!animator.GetBool("SliderEnterDoor") && !animator.GetBool("SlideEnterElevator"))
        {
            wall_requester.ReleaseWall(targetWall);
        }
        else
        {
            Debug.Log("dont release" + targetWall.name);
            wall_requester.SetWallSolved(targetWall);
        }

        //reset p1 and obstacle avoidance module
        roboticWall.wallToTarget_controller.SetP1(40);
        animator.gameObject.GetComponent <Obstacle_Avoid>().enabled = true;
    }
Exemplo n.º 3
0
 // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
 override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     animator.SetBool("ElevatorOut", false);
     door.transform.position = new Vector3(eleva.transform.position.x, door.transform.position.y, door.transform.position.z);
     wall_requester.ReleaseWall(targetWall);
 }