Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (Slicer.CanJump() && Input.GetAxis("Jump") > 0)
        {
            this.buffer.Add(Move.JUMP);
        }

        if (Slicer.CanSlice() && !Slicer.HoldingSlice() && Input.GetAxis("Slice") > 0)
        {
            this.buffer.Add(Move.HOLD_SLICE);
        }

        if (Slicer.CanSlice() && Slicer.HoldingSlice() && Input.GetAxis("Slice") <= 0)
        {
            this.buffer.Add(Move.RELEASE_SLICE);
        }

        //if (Input.GetAxis("Horizontal") != 0 || Input.GetAxis("Vertical") != 0) {
        this.buffer.Add(Move.MOVE);
        //}

        //Debug.Log(this.getBufferAsString());
    }