示例#1
0
    // Update is called once per frame
    void Update()
    {
        if (!active)
        {
            return;
        }

        if (!movement)
        {
            if (inputsManager.GetButton("Fire3"))
            {
                MoveRight();
            }
            else if (inputsManager.GetButton("Fire1"))
            {
                MoveLeft();
            }
            if (inputsManager.GetButtonDown("Fire2"))
            {
                StartCoroutine(EnterLevel());
            }
        }
        if (movement)
        {
            MoveTowardDestination();
        }
    }