public void Init(DialogTrigger dt) { canvasObject.SetActive(true); NPCName.text = dt.NPCName; DialogCamera.Instance.SetDialogTarget(dt.targetLookObj); Cursor.lockState = CursorLockMode.None; Cursor.visible = true; dialogTrigger = dt; if (dialogTrigger.dialogObject.canExit) { exitButton.SetActive(true); } else { exitButton.SetActive(false); } int start = GetStartingDialog(); if (start < 0) { CloseDialog(); } else { SetDialogSection(start); } }
// Start is called before the first frame update void Start() { _dt = GetComponent <DialogTrigger>(); _eKey = GetComponentInChildren <EtoInteract>(); _initialDialog = true; }
private void BuildSimpleDialogue() { DialogueFactory.CreateDialogLogic(this.parent, this.name, this.guid, this.showOnlyOnce); MessageCenterMessageType messageType; if (this.trigger != null) { if (!Enum.TryParse(this.trigger, out messageType)) { MessageTypes customMessageType; if (!Enum.TryParse(this.trigger, out customMessageType)) { Main.Logger.LogError("[DialogueBuilder] Invalid 'Trigger' provided."); } else { messageType = (MessageCenterMessageType)customMessageType; } } DialogTrigger dialogueTrigger = new DialogTrigger(messageType, this.guid); dialogueTrigger.Run(); } }
private void Start() { audio = GetComponent <AudioSource>(); dialogManager = FindObjectOfType <DialogManager>(); dialogTrigger = CookieDialog.GetComponent <DialogTrigger>(); outlineC.SetColor("_Color", Color.black); }
// Start is called before the first frame update void Start() { _clubNotFound = true; _eventManager = EventManager.Instance != null ? EventManager.Instance : FindObjectOfType <EventManager>(); if (_eventManager == null) { Debug.Log("Event Manager is null"); } _eToInteract = GetComponentInChildren <EtoInteract>(); if (_eToInteract == null) { Debug.Log("Player Canvas is NULL"); } _dt = GetComponent <DialogTrigger>(); if (_dt == null) { Debug.Log("Dialog Trigger is NULL"); } _dt.SetActiveOnEnterFalse(); _eventManager.ClubFound += StartHintDialog; }
private IEnumerator StartDialogTurn(GameObject gameObject) { DialogTrigger dTrigger = gameObject.GetComponent <DialogTrigger>(); cameraControl.MoveCamera(gameObject.transform.position); return(dTrigger.TriggerDialog()); }
public void Setup(Transform[] wayPoints) { enemyMovement = instance.GetComponent <EnemyMovement>(); fieldOfView = instance.GetComponent <FieldOfView>(); dialog = instance.GetComponent <DialogTrigger>(); enemyMovement.waypoints = wayPoints; }
public void StartDialog(DialogTrigger dialog) { currentDialog = dialog; currentDialog.DisableInteractionTemp(); otherAudio = dialog.Source; currentDialogNode = dialog.CurrentNode; interfaceController.AddMask_(this); }
public virtual void Setup(List <GameObject> answerDests) { playerMovement = instance.GetComponent <PlayerMovement>(); playerContent = instance.GetComponent <PlayerContent>(); dialog = instance.GetComponent <DialogTrigger>(); playerContent.answerDestinations = answerDests; playerContent.homeSeat = homeSeat; playerContent.SetAnswers(); }
public void OnTriggerExit2D(Collider2D other) { DialogTrigger trigger = other.GetComponentInChildren <DialogTrigger>(); if (trigger != null) { dialogGiver = null; } }
private void Awake() { if (PlayerPrefs.GetInt("ActionFigure") == 1 || PlayerPrefs.GetInt("ActionInDoor") == 1) { Destroy(gameObject); } dialogManager = FindObjectOfType <DialogManager>(); dialogTrigger = GetComponent <DialogTrigger>(); }
protected override void Close_() { currentDialog.EnableInteractionTemp(); currentDialog = null; currentDialogNode = null; currentTextAnimation?.Stop(); GetComponent <Rigidbody>().isKinematic = false; GameManager.UnfreezePlayer(); GameManager.UnfreezeCamera(); }
// Start is called before the first frame update void Start() { dialogTrigger = GetComponent <DialogTrigger>(); dialog = new Dialog { Name = "JICE" }; dialog.Sentences = new Queue(); dialog.Sentences.Enqueue("GreatJob"); dialogTrigger.TriggerDialog(dialog); }
private void BuildSimpleDialogue() { DialogueFactory.CreateDialogLogic(this.parent, this.name, this.guid, this.showOnlyOnce); if (this.trigger != null) { MessageCenterMessageType triggerMessageType = (MessageCenterMessageType)Enum.Parse(typeof(MessageCenterMessageType), this.trigger); DialogTrigger dialogueTrigger = new DialogTrigger(triggerMessageType, this.guid); dialogueTrigger.Run(); } }
// Use this for initialization void Start() { InstantiatePlayer(); userInterface = GameObject.Find("User Interface"); dialogManager = userInterface.GetComponentInChildren <DialogManager>(); storyTrigger = GameObject.Find("WinScript").GetComponent <DialogTrigger>(); //GameObject.Find("WinScript").GetComponent<DialogTrigger>().TriggerEvent(); notYetStarted = true; }
public void StartConversation(Conversation conversation, DialogTrigger trigger) { if (eventList.Count != 0) { return; } eventList = conversation.Conversations; //Debug.Log(trigger.gameObject.name); ResetEvents(); StartTimer(); }
//DialogController dialogController; private void Start() { //dialogController = GameObject.FindGameObjectWithTag("ClientMenu").GetComponent<DialogController>(); stopPoint = GameObject.FindGameObjectWithTag("Player").transform; gonePoint = GameObject.Find("ClientGonePoint").GetComponent <Transform>(); onStopPoint = false; DataHolder.currentClientComplete = false; dialogTrigger = GetComponent <DialogTrigger>(); alreadySelected = false; outline.SetActive(false); }
private void Awake() { if (PlayerPrefs.GetInt("Besen") == 1) { Destroy(gameObject); } demonMode = FindObjectOfType <DemonMode>(); dialogManager = FindObjectOfType <DialogManager>(); dialogTrigger = GetComponent <DialogTrigger>(); }
// Start is called before the first frame update void Start() { _dt = GetComponent <DialogTrigger>(); _eventManager = EventManager.Instance != null ? EventManager.Instance : FindObjectOfType <EventManager>(); if (_eventManager == null) { Debug.Log("Event Manager is null"); } _eventManager.SkeletonCrushed += TriggerCrushDialog; }
void Start() { trigger = GetComponent <DialogTrigger>(); //target = GameObject.FindGameObjectWithTag("Player").transform; canvasGroup = GameObject.Find("Interface").GetComponent <CanvasGroup>(); Alert = GameObject.Find("Alert"); audi_source = Player.GetComponent <Player_Movement>().audi; //fail_sound = Player.GetComponent<Player_Movement>().Fail; //success_sound = Player.GetComponent<Player_Movement>().Success; click_sound = Player.GetComponent <Player_Movement>().Click; PC = GameObject.Find("Progress_Obj").GetComponent <Progress_Controller>(); }
private void Start() { audio = GetComponent <AudioSource>(); dialogManager = FindObjectOfType <DialogManager>(); dialog = GetComponent <DialogTrigger>(); spriteRenderer = hamsterCage.GetComponent <SpriteRenderer>(); spriteRenderer.sprite = lockedCage; if (PlayerPrefs.GetInt("CageUnlocked") == 1 || PlayerPrefs.GetInt("TeddyInDoor") == 1) { spriteRenderer.sprite = unlockedCage; } }
void Awake() { dialog = gameObject.Q <DialogTrigger>(); if (Gamepad.current != null) { dialog.listSentences.Add(sentenceGamepad); } else { dialog.listSentences.Add(sentenceKeyboard); } }
private void OnTriggerEnter(Collider collision) { if (collision.gameObject.tag == "Dialog") { enter_dialod = collision.gameObject; collision.gameObject.GetComponent <DialogTrigger>().hintView(true); } if (collision.gameObject.tag == "Battle") { enter_battle = collision.gameObject.GetComponent <DialogTrigger>(); collision.gameObject.GetComponent <DialogTrigger>().hintView(true); } }
// Use this for initialization void Start() { luna = GameObject.Find("Luna"); userInterface = GameObject.Find("User Interface"); dialogManager = userInterface.GetComponentInChildren <DialogManager>(); audioSource = GameObject.Find("Music").GetComponentInChildren <AudioSource>(); storyTrigger = luna.GetComponent <DialogTrigger>(); SetPosition(); audioSource.Stop(); startBattleToggle = 0; luna.GetComponent <LunaBehavior>().attackSkipToggle = false; }
// Start is called before the first frame update void Start() { _anim = GetComponent <Animator>(); _spriteR = GetComponent <SpriteRenderer>(); _dt = GetComponent <DialogTrigger>(); _eventManager = EventManager.Instance != null ? EventManager.Instance : FindObjectOfType <EventManager>(); if (_eventManager == null) { Debug.Log("Event Manager is NULL"); } _eventManager.FreeGammieSceneActive += StartGammieDialogue; }
private void OnTriggerExit(Collider collision) { if (collision.gameObject.tag == "Dialog") { enter_dialod.GetComponent <DialogTrigger>().dialog_panel.GetComponent <Dialog>().CloseDialog(); enter_dialod = null; collision.gameObject.GetComponent <DialogTrigger>().hintView(false); } if (collision.gameObject.tag == "Battle") { enter_battle = null; collision.gameObject.GetComponent <DialogTrigger>().hintView(false); } }
IEnumerator CheckAllKeysFound() { DialogTrigger storyTrigger = GetComponent <DialogTrigger>(); DialogManager dialogManager = FindObjectOfType <DialogManager>(); yield return(null); /*if (lunaKey >= 4) { * yield return new WaitUntil(() => dialogManager.GetStillPlaying() == false); * storyTrigger.TriggerEvent(); * yield return new WaitUntil(() => dialogManager.GetStillPlaying() == false); * SceneManager.LoadScene(0); * }*/ }
private void OnEnable() { this.mb = target as DialogTrigger; this.triggerTypeProp = serializedObject.FindProperty("triggerType"); this.startTypeProp = serializedObject.FindProperty("startType"); this.targetDialogSystemPorp = serializedObject.FindProperty("targetDialogSystem"); this.dialogNameToTriggerProp = serializedObject.FindProperty("dialogNameToTrigger"); this.triggerOnlyOnce = serializedObject.FindProperty("triggerOnlyOnce"); this.sequenceRangeProp = serializedObject.FindProperty("sequenceRange"); this.disableObjProp = serializedObject.FindProperty("disableThisGameObjectOnEnd"); this.messageToStartProp = serializedObject.FindProperty("messageToStart"); this.messageToEnableThisProp = serializedObject.FindProperty("messageToEnableThis"); this.workTypeProp = serializedObject.FindProperty("workType"); this.allowProgressRangeProp = serializedObject.FindProperty("allowProgressRange"); }
public static void FightSteersman() { PirateSwordFight steersmanFight = GameObject.FindGameObjectWithTag("Steersman").GetComponent <PirateSwordFight>(); DialogTrigger d = steersmanFight.GetComponent <DialogTrigger>(); GameManager.Story.IsFightingSteersman = true; PartyAffiliation player = GameManager.GetPlayerComponent <PartyAffiliation>(); d.DisableInteraction(); player.party = PartyAffiliation.PartyName.French; steersmanFight.DoDelayed(5f, delegate { GameManager.GetPlayerComponent <InterfaceController>().Clear(); steersmanFight.AttackTarget(player); }); }
public void StartDialog(NPC npc, int numberOfInteractions, DialogTrigger dialogTrigger) { this.dialogTrigger = dialogTrigger; dialogText.text = ""; animator.SetBool("IsOpen", true); nameText.text = npc.name; sentences.Clear(); foreach (string sentence in npc.dialogs[numberOfInteractions].sentences) { sentences.Enqueue(sentence); } StartCoroutine(WaitForEndOfAnimation()); }
/// <summary> /// Creates Game2. /// </summary> public GMGame CreateGame2() { //create conditions ACondition falseCond = new FalseCondition(); ACondition trueCond = new TrueCondition(); ScriptCondition<bool> scriptCond = new ScriptCondition<bool>(TestScriptConditionEvaulateBool, true); //create triggers ScriptTrigger<int> trigger1 = new ScriptTrigger<int>(2, 2, trueCond.Check, trueCond.Check, TestScriptFunctionInt, 1); ScriptTrigger<float> trigger2 = new ScriptTrigger<float>(5, 10, trueCond.Check, falseCond.Check, TestScriptFunctionFloat, 2.2f); ScriptTrigger<string> trigger3 = new ScriptTrigger<string>(1, 3, null, null, TestScriptFunctionString, "no conditions"); DialogTrigger trigger4 = new DialogTrigger(1, 3, scriptCond.Check, null, "myDialog"); //create games and add triggers GMGame game = new GMGame("game2"); game.AddTrigger(trigger1); game.AddTrigger(trigger2); game.AddTrigger(trigger3); game.AddTrigger(trigger4); return game; }