Example #1
0
        public Input getInput(int frame, InputBlueprint inputBlueprint)
        {
            bool  jump  = false;
            Input input = new Input(0, 0, 0, 0, 0);

            if (frame > inputBlueprint.length)
            {
                input.frame = -1;
                return(input);
            }
            else
            {
                Console.WriteLine(frame);
            }

            Debug.WriteLine("----- " + inputBlueprint.jumptoggleFrames);

            foreach (int jumpToggleFrame in inputBlueprint.jumptoggleFrames)
            {
                if (jumpToggleFrame <= frame)
                {
                    jump = !jump;
                }
            }

            foreach (Input controllerFrame in inputBlueprint.controllerFrames)
            {
                if (controllerFrame.frame <= frame)
                {
                    input = controllerFrame;
                }
            }
            input.jump = jump;
            return(input);
        }
Example #2
0
        public static InputBlueprint stall()
        {
            int            blueprintLength = 1;
            InputBlueprint blueprint       = new InputBlueprint(blueprintLength);

            blueprint.controllerFrames.Add(new Input(0, 0, 0, -1, 1));
            blueprint.jumptoggleFrames.Add(0);
            blueprint.controllerFrames.Add(new Input(1, 0, 0, 0, 0));
            blueprint.jumptoggleFrames.Add(1);

            return(blueprint);
        }
Example #3
0
        public static InputBlueprint getHalfCabFlip2()
        {
            int            blueprintLength = 83;
            InputBlueprint blueprint       = new InputBlueprint(blueprintLength);

            blueprint.jumptoggleFrames.Add(0);
            blueprint.controllerFrames.Add(new Input(0, 0, 0, 0, 0));
            blueprint.jumptoggleFrames.Add(3);

            blueprint.controllerFrames.Add(new Input(10, -1, 0, 0, 0));
            blueprint.jumptoggleFrames.Add(10);
            blueprint.jumptoggleFrames.Add(11);
            blueprint.controllerFrames.Add(new Input(25, 1, 0, 0, 1));
            blueprint.controllerFrames.Add(new Input(35, 1, 0, 1, 0));
            blueprint.controllerFrames.Add(new Input(65, 1, 0, 0, 0));

            return(blueprint);
        }
Example #4
0
        public static InputBlueprint waveDash()
        {
            int            blueprintLength = 50;
            InputBlueprint blueprint       = new InputBlueprint(blueprintLength);

            blueprint.jumptoggleFrames.Add(0);
            blueprint.jumptoggleFrames.Add(1);

            blueprint.controllerFrames.Add(new Input(32, 0, 0, -1, 0));
            blueprint.controllerFrames.Add(new Input(45, 0, 0, 0, 0));
            blueprint.controllerFrames.Add(new Input(49, 0, 0, 1, 0));
            blueprint.jumptoggleFrames.Add(49);

            blueprint.controllerFrames.Add(new Input(50, 0, 0, 0, 0));
            blueprint.jumptoggleFrames.Add(50);


            return(blueprint);
        }
Example #5
0
        public static InputBlueprint getHalfCabFlip()
        {
            int            blueprintLength = 78;
            InputBlueprint blueprint       = new InputBlueprint(blueprintLength);

            blueprint.jumptoggleFrames.Add(0);
            blueprint.controllerFrames.Add(new Input(0, 0, 0, 0, 1));
            blueprint.jumptoggleFrames.Add(3);

            blueprint.controllerFrames.Add(new Input(5, 1, 0, 0, 0));
            blueprint.jumptoggleFrames.Add(5);
            blueprint.jumptoggleFrames.Add(6);
            blueprint.controllerFrames.Add(new Input(20, -1, 0, 0, -1));
            blueprint.controllerFrames.Add(new Input(30, -1, 0, 1, 0));
            blueprint.controllerFrames.Add(new Input(40, -1, 0, 1, 0));
            blueprint.controllerFrames.Add(new Input(60, -1, 0, 0, 1));

            return(blueprint);
        }
Example #6
0
 public Move(InputBlueprint inputBlueprint)
 {
     blueprint = inputBlueprint;
 }