Example #1
0
    public InputFrame(InputProfile inputProfile)
    {
        x      = inputProfile.x();
        y      = inputProfile.y();
        h      = inputProfile.h();
        v      = inputProfile.v();
        scroll = inputProfile.scroll();

        CameraController cc;

        if (cc = Camera.main.GetComponent <CameraController>())
        {
            Vector2 relInput = cc.InputToCameraSpace(new Vector2(x, y));
            x = relInput.x;
            y = relInput.y;
        }

        JumpPress = inputProfile.JumpPress();
        JumpHold  = inputProfile.JumpHold();

        PrimaryPress = inputProfile.PrimaryPress();
        PrimaryHold  = inputProfile.PrimaryHold();

        SecondaryPress = inputProfile.SecondaryPress();
        SecondaryHold  = inputProfile.SecondaryHold();

        Ability3Press = inputProfile.Ability1Press();
        Ability3Hold  = inputProfile.Ability1Hold();

        Ability4Press = inputProfile.Ability2Press();
        Ability4Hold  = inputProfile.Ability2Hold();

        Ability5Press = inputProfile.Ability3Press();
        Ability5Hold  = inputProfile.Ability3Hold();

        DidScrollUp   = inputProfile.DidScrollUp();
        DidScrollDown = inputProfile.DidScrollDown();
    }