Example #1
0
 private GameObject targetWall;// the wall the elevator settled in
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     eleva   = animator.GetBehaviour <ElevatorState>().GetElevator();
     door    = eleva.transform.GetChild(0).gameObject;
     counter = 0;
     door.gameObject.transform.position = door.gameObject.transform.position - eleva.transform.right * 0.8f;
     wall_requester = GameObject.Find("User_Encounter_Area").GetComponent <Wall_Requester>();
     targetWall     = eleva.transform.GetChild(4).gameObject;
 }
Example #2
0
 private GameObject doorWall;//the door where the wall settle
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     roboticWall.Set_Robotic_Wall(animator.gameObject);
     wall_requester = GameObject.Find("User_Encounter_Area").GetComponent <Wall_Requester>();
     //user = GameObject.Find("Camera (eye)").gameObject;
     //roboticWall.wallToTarget_controller.Robot_Move_Switch(true);
     //doorWall = GameObject.Find("DoorWall");
     Debug.Log("doorwall =" + doorWall.name);
     wall_requester.SetWallSolved(doorWall);
 }
Example #3
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     fsmController = GameObject.Find("StatesController").GetComponent <FSMSystem>();
     //if it's from door state, keep the target wall same, else get target wall by controller
     //if (!animator.GetBool("SliderEnterDoor"))
     targetWall = fsmController.SendToWallState();
     roboticWall.Set_Robotic_Wall(animator.gameObject);
     slider         = targetWall.transform.GetChild(0).gameObject;
     user           = GameObject.Find("Camera (eye)").gameObject;
     wall_requester = GameObject.Find("User_Encounter_Area").GetComponent <Wall_Requester>();
     wall_requester.SetWallSolved(targetWall);
 }
Example #4
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     robotic_wall.Set_Robotic_Wall(animator.gameObject);
     statesController = GameObject.Find("StatesController").GetComponent <FSMSystem>();
     statesList       = statesController.GetStatesList();
     wall_requester   = GameObject.Find("User_Encounter_Area").GetComponent <Wall_Requester>();
     //put the wall which the elevator setteled in to sloved List
     ele_wall      = GameObject.Find("Wall_Elevator_True");
     eleva         = animator.GetBehaviour <ElevatorState>().GetElevator();
     ele_requester = eleva.GetComponent <Elevator_Requester>();
     Debug.Log("eleva =" + ele_wall.name);
     wall_requester.SetWallSolved(ele_wall);
     ele_requester.AllocateElevator(animator);
 }