public float Give; //NOT IN USE #endregion #region Functions void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.name == "player") { ds.gameObject.SetActive(true); FindObjectOfType <character>().MovePass(false); FindObjectOfType <character>().anim.SetBool("isMoving", false); ds.StartDialogue(Sentences); } }
public float Give; //NOT IN USE #endregion #region OnTrigger void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.name == "player") { ds.gameObject.SetActive(true); FindObjectOfType <character>().MovePass(false); FindObjectOfType <character>().anim.SetBool("isMoving", false); ds.StartDialogue(Sentences); gameObject.GetComponent <Rigidbody2D>().gameObject.SetActive(isOpenMoreThanOnce); } }
void CheckKey() { if (isInteract) { if (Input.GetKeyDown(interactionKey)) { ds.gameObject.SetActive(true); FindObjectOfType <character>().MovePass(false); ds.StartDialogue(Sentences); isInteract = false; } } }