//Show the main screen that contains the choice of talking, searching or suspecting public void ShowMainScreen() { Program.WriteScreen( "Someone has been assassinated tonight, " + Properties.Suspects.Count + " suspects have been arrested" + "/nand some places rely to the investigation", 25, Properties.Name, true); var choice = Application.Instance.DoAChoice("What do you want to do ?", new[] { "Talk", "Search", "Name the murderer" }); switch (choice) { case 1: ShowNpcScreen(); break; case 2: ShowSearchScreen(); break; case 3: var suspicion = new Suspicion(); suspicion.ShowSuspicionScreen(); break; } }
// initialize variables with awake function void Awake() { touchObject = this.transform.FindChild("SenseTouch").gameObject; suspicion = GetComponent<Suspicion>(); personSight = GetComponent<PersonSight>(); woken = touchObject.GetComponent<Woken>(); nav = GetComponent<NavMeshAgent>(); InitialiseSantaTransform(); gameController = GetComponent<GameController>(); }
// Use this for initialization void Awake() { suspicion = GetComponent<Suspicion>(); personSight = GetComponent<PersonSight>(); nav = GetComponent<NavMeshAgent>(); santa = GameObject.FindGameObjectWithTag("Player").transform; startingPosition = transform.position; touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); }
// Use this for initialization void Awake() { // Setting up the reference sittingScript = GetComponent<SittingScript>(); personSight = GetComponent<PersonSight>(); suspicion = GetComponent<Suspicion>(); nav = GetComponent<NavMeshAgent>(); santa = GameObject.FindGameObjectWithTag("Player").transform; originalFOV = personSight.fieldOfViewAngle; touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); }
// Use this for initialization void Awake() { // Setting up the reference sleepingScript = GetComponent<SleepingScript>(); personSight = GetComponent<PersonSight>(); suspicion = GetComponent<Suspicion>(); nav = GetComponent<NavMeshAgent>(); santa = GameObject.FindGameObjectWithTag("Player").transform; fovEyesScript = GetComponent<FOV2DEyes>(); fovConeScript = GetComponent<FOV2DVisionCone>(); touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); }
void Awake() { InitialiseSantaTransform(); personSight = GetComponent<PersonSight>(); suspicion = GetComponent<Suspicion>(); nav = GetComponent<NavMeshAgent>(); anim = GetComponent<Animator>(); touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); // Must make sure rotation of person is by the animator and not by the nav mesh agent nav.updateRotation = false; animSetup = new AnimatorSetup(anim); // Convert deadZone variable from degrees to radians deadZone *= Mathf.Deg2Rad; }