void Start () { COMMANDS = new Dictionary<string[], Action> () { { new []{ "hey", "hello", "hi", "sup", "yo", "cooldog" }, SayHello }, { new []{ "who are you", "your name" }, Introduce }, { new []{ "batman" }, BecomeBatman }, { new []{ "email" }, OpenEmail }, { new []{ "note", "memo" }, TakeNotes }, { new []{ "remember", "remind" }, RememberThing }, { new []{ "trivia", "fact", "facts", "wiki" }, TellFact }, { new []{ "housekeeping", "poop", "pooping", "clean", "cleaning", "smell", "smelly" }, SuggestCleaning }, { new []{ "bye", "cya", "quit", "exit"}, Quit } }; inputField.onEndEdit.AddListener (val => { if (Input.GetKeyDown (KeyCode.Return) || Input.GetKeyDown (KeyCode.KeypadEnter)) { Parse (inputField.text.ToLower ()); inputField.text = ""; inputField.DeactivateInputField (); inputField.interactable = false; } }); cooldog = GameObject.Find ("Cooldog").GetComponent<Cooldog>(); typer = cooldog.GetComponent<TextTyper>(); Facts = new Facts (); }
// Use this for initialization void Start () { dialogueBox.enabled = false; hideAlso.SetActive(false); busy = false; talkingSpeaker = GetComponent<AudioSource> (); cooldog = GetComponent<Cooldog>(); talkingSpeaker.clip = coolBark[Random.Range(0, coolBark.Length)]; talkingSpeaker.Play(); }
void Start() { exeDirectory = new DirectoryInfo(Application.dataPath).Parent.FullName; poopTimer = PoopDelay * UnityEngine.Random.Range(0.8f, 1.2f); var texture = Resources.Load("Poop") as Texture2D; crunchedPoop = texture.EncodeToPNG(); audioSource = GetComponent<AudioSource>(); cooldog = GetComponent<Cooldog>(); textTyper = GetComponent<TextTyper>(); scratch = GetComponentInChildren<Scratch>(); }
public void Start() { Cooldog = transform.parent.GetComponent<Cooldog>(); textTyper = transform.parent.GetComponent<TextTyper>(); }