private static FunctionBlock GenerateInputAttack(PlayerExporter exporter, Pat.Project proj)
 {
     return(new FunctionBlock("InputAttack", new string[0], new ILineObject[] {
         new ControlBlock(ControlBlockType.If, "this.input.b0 == 1", new ILineObject[] {
             new SimpleLineObject("this.u.inputCountA = 10;"),
         }).Statement(),
         new ControlBlock(ControlBlockType.If, "this.input.b1 == 1", new ILineObject[] {
             new SimpleLineObject("this.u.inputCountB = 10;"),
         }).Statement(),
         new ControlBlock(ControlBlockType.If, "this.input.b3 == 1", new ILineObject[] {
             new SimpleLineObject("this.u.inputCountC = 10;"),
         }).Statement(),
         new SimpleLineObject("this.u.inputCountA--;"),
         new SimpleLineObject("this.u.inputCountB--;"),
         new SimpleLineObject("this.u.inputCountC--;"),
     }.Concat(SkillGenerator.GenerateInputAttackFunction(exporter))));
 }
        public override void Export(Pat.Project proj)
        {
            _Project = proj;
            _GeneratedActionID.Clear();
            _SSERecorder = new SegmentStartEventRecorder();

            _NextFreeActionID = 20;

            //init script
            var actorCommon = base.AddCodeFile("actorCommon.add.cv4");

            PlayerInitFunctionGenerator.Generate(this, proj, actorCommon);

            //actions
            ExportAction(Animations.Stand, 0);
            ExportAction(Animations.Walk, 1);
            ExportAction(Animations.JumpUp, 3);
            ExportAction(Animations.JumpFront, 4);
            ExportAction(Animations.Fall, 8);
            ExportAction(Animations.Damage, 10);
            ExportReviveLightAction(17);
            ExportAction(Animations.Dead, 18);
            ExportAction(Animations.Lost, 19);

            var playerScript = base.AddCodeFile(ScriptFileName + ".cv4");

            SystemActionFunctionGenerator.Generate(this, proj, playerScript);

            this.GenEnv = SkillGenerator.CreateEnv(this, playerScript);
            SkillGenerator.GenerateSkills(this, playerScript);
            this.GenEnv = null;

            SkillGenerator.GenerateStartMotionFunction(_SSERecorder, playerScript);

            ExportAction(Animations.Stand, 100);
            ExportAction(Animations.Stand, 101);
            ExportAction(Animations.Stand, 102);
            ExportAction(Animations.Stand, 103);
        }