public void OnEnable()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Пример #2
0
    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);
        }
    }
Пример #3
0
    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
    }
Пример #4
0
 public InputInfo(string nameIn, GAME_CONTROLLER ctrlerIn, INPUT_TYPE typeIn)
 {
     InputName  = nameIn;
     controller = ctrlerIn;
     type       = typeIn;
 }
Пример #5
0
 public InputInfo()
 {
     InputName  = "unknow";
     controller = GAME_CONTROLLER.NULL;
     type       = INPUT_TYPE.NULL;
 }