// Use this for initialization void Awake() { Trans = gameObject.GetComponent <Transform>(); setPlayerRender(); Animater = gameObject.GetComponentInChildren <Animator>(); speechBubble = transform.Find("SpeechBubble").gameObject; speechText = speechBubble.GetComponentInChildren <TextMeshProUGUI>(); speechBubble.SetActive(false); setPlayerImage(); destPosition = Trans.position; authorizedDestPosition = Trans.position; mainCamera = Camera.main; transform.SetAsLastSibling(); nameOffset = new Vector3(1.0f, -60.0f, 0.0f); speechBubbleOffset = new Vector3(-53.0f, 15.0f, 0.0f); moveSpeed = 300.0f; xSpeed = 60.0f; ySpeed = 60.0f; Chat = GameObject.Find("ClientManager").GetComponent <chatManager>(); }
public void setChatMng(chatManager _Chat) { Chat = _Chat; }