Пример #1
0
        public IEnumerable <KeyBinding> GenerateMappings()
        {
            var stage1Bindings = new VariantMappingGenerator
            {
                LeftKeys          = stage1LeftKeys,
                RightKeys         = stage1RightKeys,
                SpecialKey        = InputKey.V,
                SpecialAction     = ManiaAction.Special1,
                NormalActionStart = ManiaAction.Key1
            }.GenerateKeyBindingsFor(singleStageVariant, out var nextNormal);

            var stage2Bindings = new VariantMappingGenerator
            {
                LeftKeys          = stage2LeftKeys,
                RightKeys         = stage2RightKeys,
                SpecialKey        = InputKey.B,
                SpecialAction     = ManiaAction.Special2,
                NormalActionStart = nextNormal
            }.GenerateKeyBindingsFor(singleStageVariant, out _);

            return(stage1Bindings.Concat(stage2Bindings));
        }
Пример #2
0
        public override IEnumerable <KeyBinding> GetDefaultKeyBindings(int variant = 0)
        {
            switch (getPlayfieldType(variant))
            {
            case PlayfieldType.Single:
                return(new VariantMappingGenerator
                {
                    LeftKeys = new[]
                    {
                        InputKey.A,
                        InputKey.S,
                        InputKey.D,
                        InputKey.F
                    },
                    RightKeys = new[]
                    {
                        InputKey.J,
                        InputKey.K,
                        InputKey.L,
                        InputKey.Semicolon
                    },
                    SpecialKey = InputKey.Space,
                    SpecialAction = ManiaAction.Special1,
                    NormalActionStart = ManiaAction.Key1,
                }.GenerateKeyBindingsFor(variant, out _));

            case PlayfieldType.Dual:
                int keys = getDualStageKeyCount(variant);

                var stage1Bindings = new VariantMappingGenerator
                {
                    LeftKeys = new[]
                    {
                        InputKey.Number1,
                        InputKey.Number2,
                        InputKey.Number3,
                        InputKey.Number4,
                    },
                    RightKeys = new[]
                    {
                        InputKey.Z,
                        InputKey.X,
                        InputKey.C,
                        InputKey.V
                    },
                    SpecialKey        = InputKey.Tilde,
                    SpecialAction     = ManiaAction.Special1,
                    NormalActionStart = ManiaAction.Key1
                }.GenerateKeyBindingsFor(keys, out var nextNormal);

                var stage2Bindings = new VariantMappingGenerator
                {
                    LeftKeys = new[]
                    {
                        InputKey.Number7,
                        InputKey.Number8,
                        InputKey.Number9,
                        InputKey.Number0
                    },
                    RightKeys = new[]
                    {
                        InputKey.O,
                        InputKey.P,
                        InputKey.BracketLeft,
                        InputKey.BracketRight
                    },
                    SpecialKey        = InputKey.BackSlash,
                    SpecialAction     = ManiaAction.Special2,
                    NormalActionStart = nextNormal
                }.GenerateKeyBindingsFor(keys, out _);

                return(stage1Bindings.Concat(stage2Bindings));
            }

            return(new KeyBinding[0]);
        }
Пример #3
0
        public override IEnumerable <KeyBinding> GetDefaultKeyBindings(int variant = 0)
        {
            switch (getPlayfieldType(variant))
            {
            case PlayfieldType.Single:
                return(new VariantMappingGenerator
                {
                    LeftKeys = new[]
                    {
                        InputKey.A,
                        InputKey.S,
                        InputKey.D,
                        InputKey.F
                    },
                    RightKeys = new[]
                    {
                        InputKey.J,
                        InputKey.K,
                        InputKey.L,
                        InputKey.Semicolon
                    },
                    SpecialKey = InputKey.Space,
                    SpecialAction = ManiaAction.Special1,
                    NormalActionStart = ManiaAction.Key1,
                }.GenerateKeyBindingsFor(variant, out _));

            case PlayfieldType.Dual:
                int keys = getDualStageKeyCount(variant);

                var stage1Bindings = new VariantMappingGenerator
                {
                    LeftKeys = new[]
                    {
                        InputKey.Q,
                        InputKey.W,
                        InputKey.E,
                        InputKey.R,
                    },
                    RightKeys = new[]
                    {
                        InputKey.X,
                        InputKey.C,
                        InputKey.V,
                        InputKey.B
                    },
                    SpecialKey        = InputKey.S,
                    SpecialAction     = ManiaAction.Special1,
                    NormalActionStart = ManiaAction.Key1
                }.GenerateKeyBindingsFor(keys, out var nextNormal);

                var stage2Bindings = new VariantMappingGenerator
                {
                    LeftKeys = new[]
                    {
                        InputKey.Number7,
                        InputKey.Number8,
                        InputKey.Number9,
                        InputKey.Number0
                    },
                    RightKeys = new[]
                    {
                        InputKey.K,
                        InputKey.L,
                        InputKey.Semicolon,
                        InputKey.Quote
                    },
                    SpecialKey        = InputKey.I,
                    SpecialAction     = ManiaAction.Special2,
                    NormalActionStart = nextNormal
                }.GenerateKeyBindingsFor(keys, out _);

                return(stage1Bindings.Concat(stage2Bindings));
            }

            return(Array.Empty <KeyBinding>());
        }