IEnumerator Slip() { yield return(new WaitForEndOfFrame()); MessageSystemPlayingScene.Slip(); DisableScreen(); }
private void Start() { isPressed = 0; img = GetComponent <Image>(); play[0] = () => { if (lastPlay != null) { lastPlay.GetComponent <Image>().sprite = sprite[0]; lastPlay.GetComponent <PlayOnMusicPanel>().isPressed = 0; } img.sprite = sprite[1]; MessageSystemPlayingScene.PlayClip(clip); lastPlay = gameObject; isPressed = 1; }; play[1] = () => { img.sprite = sprite[0]; MessageSystemPlayingScene.StopClip(); isPressed = 0; lastPlay = null; }; }
private void OnMouseUp() { anim.Play("GoAway"); if (!MessageSystemPlayingScene.IsStart) { menuPanel.SetActive(false); MessageSystemPlayingScene.StartGame(); if (Conecting.Management == 0) { screen.SetActive(true); } else { StartCoroutine(EnButtons()); } MessageSystemGameBlock.DisableAllBlock(); Score.increeze(); } else { MessageSystemGameBlock.StartAfterHit(); MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 1; EnableButtons(); } if (PlayerPrefs.HasKey("FirstStart")) { PauseGame.IsPause = false; pause.SetActive(true); } else { FirstStart.SetActiveStopCollider(true); } source.Play(); }
public static void DeathAfterDeadLine() { MessageSystemPlayingScene.GeneralyPartOfDeath(); MessageSystemPlayingScene.AutoSelectNextCharacter(); MessageSystemGameBlock.StartGame(); MessageSystemPlayingScene.InBodyColider = false; }
private void OnCollisionEnter2D(Collision2D collision) { GameObject obj = collision.gameObject; if (PlayerZone.IsOutside && !MessageSystemPlayingScene.Player.CompareTag("InVisible") && !MessageSystemPlayingScene.IsDead) { PlayerZone.MoveToPlayerZone(); } if ((obj.CompareTag("Player") || (obj.CompareTag("Hit") && obj.name == "Brian")) && MessageSystemPlayingScene.IsJump) { MessageSystemPlayingScene.exitFromPingPong = false; if (!PlayerZone.IsOutside) { MessageSystemPlayingScene.SetDefaultConstraints(); } else { MessageSystemGameBlock.SetPlayingConstraints(); } if (Conecting.Management == 0 && !TapToGo.Screen.activeInHierarchy) { TapToGo.Screen.SetActive(true); } MessageSystemPlayingScene.IsJump = false; MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsRunAgain", true); StartCoroutine(PreparationToJump()); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("Player") && !isOne) { isOne = true; MessageSystemPlayingScene.speedy(); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.CompareTag("Player") && !isOne) { isOne = true; MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDefaultDeath", true); MessageSystemPlayingScene.GeneralyPartOfDeath(); } }
IEnumerator PreparationToJump() { MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsJumpUp", false); MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsJumpDown", false); yield return(new WaitForSeconds(0.4f)); MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsRunAgain", false); MessageSystemPlayingScene.EnableCollider(); }
IEnumerator Death() { yield return(new WaitForSeconds(0.4f)); MessageSystemPlayingScene.AutoSelectNextCharacter(); yield return(new WaitForSeconds(0.1f)); MessageSystemPlayingScene.InBodyColider = false; }
private void OnCollisionStay2D(Collision2D collision) { if (collision.gameObject.CompareTag("Player") || collision.gameObject.CompareTag("Hit")) { if (collision.gameObject.name == tag && !MessageSystemPlayingScene.IsJump) { MessageSystemPlayingScene.SetDefaultConstraints(); } } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("Player") && !robotScript.IsOne) { robotScript.IsOne = true; robDead.Death(); MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDeath", true); MessageSystemPlayingScene.GeneralyPartOfDeath(); } }
private void OnMouseDown() { if (!StopCollider.IsCollision) { if (!MessageSystemPlayingScene.IsDead) { WaitingScreen.wait(MessageSystemPlayingScene.DisableCollider()); } transform.localScale = new Vector3(changeScale, changeScale, 1); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("Player") && !isDeadLine) { isDeadLine = true; MessageSystemPlayingScene.GeneralyPartOfDeath(); MessageSystemPlayingScene.AutoSelectNextCharacter(); MessageSystemGameBlock.StartGame(); MessageSystemPlayingScene.InBodyColider = false; } }
public void ExitFromTeleport() { if (!PlayerZone.IsOutside) { MessageSystemPlayingScene.SetDefaultConstraints(); } else { MessageSystemGameBlock.SetPlayingConstraints(); } MessageSystemPlayingScene.Player.tag = "Player"; }
private void OnMouseUp() { upPosition = Input.mousePosition; if (downPosition == upPosition)// Hit { MessageSystemPlayingScene.Hit(); isSwipe = false; DisableScreen(); } isSwipe = false; }
private void OnTriggerExit2D(Collider2D collision) { if ((collision.gameObject.CompareTag("Player") || collision.gameObject.CompareTag("Hit")) && collision.gameObject.activeInHierarchy) { if (collision.gameObject.name != tag && !isOne) { isOne = true; MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDeath", true); MessageSystemPlayingScene.GeneralyPartOfDeath(); } } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("Player") && !isOne) { isOne = true; GameObject player = MessageSystemPlayingScene.Player; player.GetComponent <Rigidbody2D>().AddForce(new Vector2(1.5f, 0), ForceMode2D.Impulse); player.GetComponent <Animator>().SetBool("IsFall", true); MessageSystemPlayingScene.GeneralyPartOfDeath(); StartCoroutine(Death()); } }
private void OnMouseDown() { if (!MessageSystemPlayingScene.IsStart) { Hint.PlayClip(); } if (!StopCollider.IsCollision) { InstantiateSpeed(gameObject.name); MessageSystemPlayingScene.SelectHero(gameObject); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.layer == 10 && !isOne) { isOne = true; MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDeath", true); MessageSystemPlayingScene.GeneralyPartOfDeath(); } if (collision.gameObject.layer == 9 && !isOne) { GetComponent <CircleCollider2D>().enabled = false; } }
public static void Resume() { MessageSystemPlayingScene.EnableCollider(); StopCollider.IsCollision = false; MessageSystemPlayingScene.IsHit = false; MessageSystemGameBlock.StartAfterHit(); MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 1; StopCollider.RestoreConstraints(); StopCollider.PlayAnimation(); StopCollider.SetDefaultSortingLayer(); StopCollider.SetActiveImageButtons(false); panel.SetActive(false); }
IEnumerator Teleport(float deltaX) { yield return(new WaitForEndOfFrame()); if (deltaX < 0)//Teleport { MessageSystemPlayingScene.Teleport(); if (!MessageSystemPlayingScene.IsTeleport) { DisableScreen(); } } }
public void JumpBeforBrianHit() { MessageSystemPlayingScene.IsJump = true; PlayerZone.SetNoneRigid(); MessageSystemGameBlock.SetPlayingConstraints(); if (!MessageSystemPlayingScene.exitFromPingPong) { MessageSystemPlayingScene.exitFromPingPong = true; } if (!MessageSystemPlayingScene.IsDead) { WaitingScreen.wait(MessageSystemPlayingScene.DisableCollider()); MessageSystemPlayingScene.Player.GetComponent <Rigidbody2D>().AddForce(new Vector2(0, 9), ForceMode2D.Impulse); } }
private void OnTriggerExit2D(Collider2D collision) { if (collision.gameObject.CompareTag("Player") && !MessageSystemPlayingScene.IsJump) { if (!PlayerZone.IsOutside) { MessageSystemPlayingScene.SetDefaultConstraints(); } else { MessageSystemGameBlock.SetPlayingConstraints(); } MessageSystemPlayingScene.SetVisibleImagePlayer(true); MessageSystemPlayingScene.InBodyColider = false; } }
private void OnTriggerEnter2D(Collider2D collision) { string name = collision.gameObject.name; if (hashtable.ContainsKey(name)) { GameObject obj = collision.gameObject; StopGame(); sortingLayerObj = null; MessageSystemPlayingScene.EnableCollider(); SaveConstraints(); MessageSystemPlayingScene.Player.GetComponent <Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeAll; panel.SetActive(true); isCollision = true; education[(int)hashtable[obj.name]](obj); hashtable.Remove(name); } }
private void OnCollisionEnter2D(Collision2D collision) { if (PlayerZone.IsOutside) { PlayerZone.MoveToPlayerZone(); } if (collision.gameObject.CompareTag("Player") && MessageSystemPlayingScene.IsJump && !Cube.IsCollision) { MessageSystemPlayingScene.exitFromPingPong = false; if (!PlayerZone.IsOutside) { MessageSystemPlayingScene.SetDefaultConstraints(); } else { MessageSystemGameBlock.SetPlayingConstraints(); } MessageSystemPlayingScene.IsJump = false; MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsRunAgain", true); StartCoroutine(PreparationToJump()); } }
public void Death() { MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDefaultDeath", true); MessageSystemPlayingScene.GeneralyPartOfDeath(); }
public void EnterToTeleport() { MessageSystemPlayingScene.Player.tag = "InVisible"; MessageSystemPlayingScene.SetDefaultConstraints(); }
private void OnMouseUp() { transform.localScale = new Vector3(defaultSize, defaultSize, 1); MessageSystemPlayingScene.SetDefaultVal(); SceneManager.LoadScene(1); }
public void EnCol() { MessageSystemPlayingScene.EnableCollider(); }
public void DisCol() { WaitingScreen.wait(MessageSystemPlayingScene.DisableCollider()); }