void OnCollisionEnter2D(Collision2D col) { if (col.transform.tag == "Tori") { ato = 0; tori.DisableThisScript(); GetComponent <ColeteAllThings> ().enabled = true; tori.transform.localScale = new Vector3(1, tori.transform.localScale.y, tori.transform.localScale.z); tori.GetComponent <Atos> ().StartActionWalk(toriVelocity, toriLimitatorPosition); tori.GetComponent <Atos> ().enabled = true; } }
void OnTriggerEnter2D(Collider2D col) { if (col.tag == "Tori") { initialPosition [0] = tori.transform.position; initialPosition [1] = suku.transform.position; ato = 0; tori.DisableThisScript(); GetComponent <SukuAto> ().enabled = true; tori.transform.localScale = new Vector3(1, tori.transform.localScale.y, tori.transform.localScale.z); tori.GetComponent <Atos> ().StartActionWalk(toriVelocity, toriPositions[toriIndice]); suku.StartActionWalk(sukuVelocity, sukuPositions[sukuIndice]); suku.GetComponent <Atos> ().enabled = true; tori.GetComponent <Atos> ().enabled = true; dialogController.ChangeMyFile(file); for (int i = 0; i < 2; i++) { dialogController.GetNextButton(i).onClick.RemoveAllListeners(); dialogController.GetBackButton(i).onClick.RemoveAllListeners(); dialogController.GetJumpButton(i).onClick.RemoveAllListeners(); dialogController.GetNextButton(i).onClick.AddListener(NextButonPress); dialogController.GetBackButton(i).onClick.AddListener(PressedEscape); dialogController.GetJumpButton(i).onClick.AddListener(JumpButonPress); } } }
void OnTriggerEnter2D(Collider2D col) { if (col.tag == "Tori" && !GetComponent <FukaAtos> ().enabled) { initialPosition [0] = tori.transform.position; initialPosition [1] = fuka.transform.position; ato = 0; timerCount = 0f; timeToWait = 2f; tori.DisableThisScript(); GetComponent <FukaAtos> ().enabled = true; tori.transform.localScale = new Vector3(-1, tori.transform.localScale.y, tori.transform.localScale.z); tori.GetComponent <Atos> ().StartActionWalk(-toriVelocity, toriPositions[toriIndice]); toriIndice++; tori.GetComponent <Atos> ().enabled = true; dialogController.ChangeMyFile(file); fuka.GetComponent <Atos> ().enabled = true; fuka.transform.localScale = new Vector3(-fukaScaleX, fuka.transform.localScale.y, fuka.transform.localScale.z); for (int i = 0; i < 2; i++) { dialogController.GetNextButton(i).onClick.RemoveAllListeners(); dialogController.GetBackButton(i).onClick.RemoveAllListeners(); dialogController.GetJumpButton(i).onClick.RemoveAllListeners(); dialogController.GetNextButton(i).onClick.AddListener(NextButonPress); dialogController.GetBackButton(i).onClick.AddListener(PressedEscape); dialogController.GetJumpButton(i).onClick.AddListener(JumpButonPress); } } }
void OnCollisionEnter2D(Collision2D col) { if (col.transform.tag == "Tori") { ato = 0; dialogController.ChangeCameraFollowEnable(false); dialogController.ChangeLerpPosition(mainCameraPositions, mainCameraLerp); tori.DisableThisScript(); GetComponent <OperatorChefLimiter> ().enabled = true; tori.transform.localScale = new Vector3(-1, tori.transform.localScale.y, tori.transform.localScale.z); tori.GetComponent <Atos> ().StartActionWalk(toriVelocity, toriLimitatorPosition); tori.GetComponent <Atos> ().enabled = true; } }