// Use this for initialization void Start() { ChracterInteract characterIntercat = GameObject.FindGameObjectWithTag("Player").GetComponent <ChracterInteract>(); characterIntercat.PermitAction(0, false); characterIntercat.PermitAction(1, false); characterIntercat.PermitAction(2, false); characterIntercat.PermitAction(3, false); characterIntercat.PermitAction(4, true); }
// Use this for initialization void Start() { lastFrameRot = new Vector3(0, 0, 0); for (int i = 0; i < transform.childCount; i++) { if (transform.GetChild(i).tag == "Player") { player = transform.GetChild(0).gameObject; player.GetComponent <CharacterMovement>().CutsceneLock = true; player.GetComponentInChildren <CameraController>().CutsceneLock = true; ChracterInteract characterIntercat = player.GetComponent <ChracterInteract>(); characterIntercat.PermitAction(0, false); characterIntercat.PermitAction(1, false); characterIntercat.PermitAction(2, false); characterIntercat.PermitAction(3, false); characterIntercat.PermitAction(4, true); break; } } }
// Update is called once per frame void Update() { if (player) { lastFrameRot = player.transform.localEulerAngles; if (PlayState.Paused == GetComponent <PlayableDirector>().state) { player.transform.parent = null; player.GetComponent <CharacterMovement>().CutsceneLock = false; player.GetComponentInChildren <CameraController>().CutsceneLock = false; ChracterInteract characterIntercat = player.GetComponent <ChracterInteract>(); characterIntercat.PermitAction(0, true); characterIntercat.PermitAction(1, true); characterIntercat.PermitAction(2, true); characterIntercat.PermitAction(3, true); characterIntercat.PermitAction(4, false); Destroy(gameObject); //Debug.Log("Thi"); } } }
public void triggerTutorial(int tutorialID) { tutorialUI.setTutorial(tutorialTexts[tutorialID]); activeTutorial = tutorialID; Debug.Log("Triggering: " + tutorialID); switch (tutorialID) { case 0: //dog moves to player player.GetComponent <CharacterMovement>().CutsceneLock = true; ci.PermitAction(0, false); ci.PermitAction(1, false); ci.PermitAction(2, false); ci.PermitAction(3, false); dog.StartAction(new Call(dog.GetComponent <Dog>(), player.transform)); finishTutorial(activeTutorial); break; case 1: //pet dog ci.PermitAction(2, true); //tutorial 1 starting break; case 2: //dog go to waypoint ci.PermitAction(2, false); dog.StartAction(new GoStraightToPosition(dog.GetComponent <Dog>(), dogWaypoint.position)); //tutorial 2 starting break; case 3: ci.PermitAction(1, true); //enable call dog thing break; case 4: ci.PermitAction(1, false); ci.PermitAction(3, true); //pick up dog enable break; } }