Example #1
0
        // Retun false if not hit, retun true if hit
        public override bool CheckHit(InputRow currentInput)
        {
            InputNote inputNote = null;

            switch (trickType)
            {
            case TrickType.A:
                inputNote = currentInput.noteA;
                break;

            case TrickType.B:
                inputNote = currentInput.noteB;
                break;
            }


            // Cancel if Null
            if (inputNote == null)
            {
                return(false);
            }


            // Destroy Self if hit, just pressed
            if (inputNote.GetJustPressed())
            {
                Destroy(gameObject);
            }

            return(true);
        }
Example #2
0
        // Retun false if not hit, retun true if hit
        public override bool CheckHit(InputRow currentInput)
        {
            InputNote inputNote = null;

            switch (noteType)
            {
            case NoteType.LEFT:
                inputNote = currentInput.noteLeft;
                break;

            case NoteType.DOWN:
                inputNote = currentInput.noteDown;
                break;

            case NoteType.UP:
                inputNote = currentInput.noteUp;
                break;

            case NoteType.RIGHT:
                inputNote = currentInput.noteRight;
                break;
            }


            // Cancel if Null
            if (inputNote == null)
            {
                return(false);
            }


            // Destroy Self if hit, just pressed
            if (inputNote.GetJustPressed())
            {
                Destroy(gameObject);
            }

            return(true);
        }