// Start is called before the first frame update void Start() { interactScript = GetComponent <Interactable>(); interactScript.OnInteract.AddListener(PlayDialouge); dialougeManager = GameObject.FindGameObjectWithTag("DialougeSystem").GetComponent <DialougeManager>(); }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
private void Awake() { _dialougeManager = DialougeManager.Instance; _switchScene = SwitchScene.Instance; _ideasController = IdeasController.Instance; dialogues = new List <Dialogue>(); _notificationController = NotificationController.Instance; _gameManager = GameManager.Instance; if (!ReferenceEquals(_gameManager, null)) { _gameManager.OnGameStateChanged.AddListener(OnGameStateChangedHandler); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == nodeTag && !isLocked) { isLocked = true; PushTarget(other.transform); if (other.name == "POI test") { theCamera.GetComponent <PlayerCamera>().zoomFactor = 0.5f; } if (other.name == "NPC POI") { theCamera.GetComponent <PlayerCamera>().zoomFactor = 0.3f; DialougeManager dialouge = GameObject.Find("DialougeManager").GetComponent <DialougeManager>(); dialouge.ConversationTrigger(); } } }
// Start is called before the first frame update void Start() { myRigidbody = GetComponent <Rigidbody2D>(); theDM = FindObjectOfType <DialougeManager>(); waitCounter = waitTime; walkCounter = walkTime; ChooseDirection(); if (walkZone != null) { minWalkPoint = walkZone.bounds.min; maxWalkPoint = walkZone.bounds.max; hasWalkZone = true; } canMove = true; }
// Start is called before the first frame update void Awake() { dialougeText = dialougePanel.transform.Find("Text").GetComponent <Text>(); ynSelect = ynPanel.transform.Find("ptr2").GetComponent <Image>(); imageOrigPos = ynSelect.rectTransform.position; selection = 1; dialougePanel.SetActive(false); ynPanel.SetActive(false); if (Instance != null && Instance != this) //catch { Destroy(gameObject); } else { Instance = this; } }
private void Start() { rb = GetComponent <Rigidbody2D>(); animator = GetComponent <Animator>(); gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); dm = GameObject.FindGameObjectWithTag("DialougeManager").GetComponent <DialougeManager>(); levelLoader = GameObject.FindGameObjectWithTag("LevelLoader").GetComponent <LevelLoader>(); transform.position = gameManager.lastCheckPointPosition; if (virtaulCamera != null) { virtualNoiseCamera = virtaulCamera.GetCinemachineComponent <Cinemachine.CinemachineBasicMultiChannelPerlin>(); } timer = timeBtwShoot; sideWallJumpDirection.Normalize(); coinText.text = coins.ToString(); healthText.text = health.ToString(); }
private void Awake() { _placesController = PlacesController.Instance; _dialougeManager = DialougeManager.Instance; _hotbarInvHandler = HotbarInvHandler.Instance; _placeId = ConvertType.GetPlaceId(place); _residentsId = new List <string>(); if (_placesController.PlacesDic.ContainsKey(_placeId)) { _residentsId = _placesController.PlacesDic[_placeId].ResidentsID; } if (!ReferenceEquals(_placeArriverDisplay, null)) { _placeArriverDisplay.OnPointerEnterNpcSlot.AddListener(OnPointerEnterHandler); _placeArriverDisplay.OnPointerExitNpcSlot.AddListener(OnPointerExitHandler); _placeArriverDisplay.OnPointerLeftClickNpcSlot.AddListener(OnPointerLeftClickHandler); _placeArriverDisplay.OnDisplayFinished.AddListener(Initizlizing); } }
void Start() { dialougeManager = GameObject.Find("DialougeManager"); managerScript = dialougeManager.GetComponent <DialougeManager>(); }
private void OnEnable() { NextLine(); currentDialougeSpeed = normalDialougeSpeed; dialougeManager = FindObjectOfType <DialougeManager>(); }
// Start is called before the first frame update void Start() { dialougeManager = GameObject.FindGameObjectWithTag("DialougeSystem").GetComponent <DialougeManager>(); }
// Start is called before the first frame update void Start() { NPC = FindObjectOfType <DialougeManager>(); }