Пример #1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (dead)
        {
            return;
        }

        moveVector.y = Mathf.Max(moveVector.y - movement.gravity * Time.deltaTime, -movement.gravity);
        playerController2D.Move(moveVector * Time.deltaTime);
        playerController2D.CheckCollisionDown();
    }
Пример #2
0
    // Update is ca   lled once per frame
    void FixedUpdate()
    {
        if (dead)
        {
            return;
        }

        moveVector.y = Mathf.Max(moveVector.y - movement.gravity * Time.deltaTime, -movement.gravity);

        playerController2D.Move(moveVector * Time.deltaTime);

        playerController2D.CheckCollisionDown();

        if (timeLastLostTarget > 0.0f)
        {
            timeLastLostTarget -= Time.deltaTime;
        }

        if (timeLostShootRate > 0.0f)
        {
            timeLostShootRate -= Time.deltaTime;
        }
    }