public void OnEnable() { if (instance == null) { instance = this; } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { AudioManager.instance.Play("Diamond"); GAME_CONTROLLER.NANO_VIBRATION(); PLAYER_MOVEMENT_SYSTEM.is_diamond_picked = true; rb.constraints = RigidbodyConstraints2D.FreezeRotation; is_time_to_move = true; } if (collision.tag == "DIAMOND_POINT") { Destroy(gameObject); } }
private IEnumerator LAND_enum() { animator.animation.Stop("freeFly"); // -----------------------------------------> animator.animation.Stop("jumpup"); // -----------------------------------------> animator.animation.Stop("jumpdown"); // -----------------------------------------> INCREMENT_CURRENT_SPEED(); #region Activate Reward text if (!is_fall_pressed && is_Jumped) { StartCoroutine("Activate_Reward_text", REWARD_FOR_LONG_JUMP); GAME_CONTROLLER.SHORT_VIBRATION(); //challenge_Controller.LongJump(); animator.animation.Play("stronglanding"); // -----------------------------------------> is_strongLanding = true; } else { StartCoroutine("Activate_Reward_text", REWARD_FOR_NICE_FALL); } #endregion #region Animation if (!is_strongLanding) { //animator.animation.Play("freefall"); // -----------------------------------------> //yield return new WaitForSeconds(0.3f); } else { yield return(new WaitForSeconds(0.5f)); is_strongLanding = false; } animator.animation.Play("run"); // -----------------------------------------> #endregion }
public InputInfo(string nameIn, GAME_CONTROLLER ctrlerIn, INPUT_TYPE typeIn) { InputName = nameIn; controller = ctrlerIn; type = typeIn; }
public InputInfo() { InputName = "unknow"; controller = GAME_CONTROLLER.NULL; type = INPUT_TYPE.NULL; }