Пример #1
0
        // Go Build Example
        private static IAttack GoBuildExample()
        {
            var samplesOutput = new SamplesOutput();
            var attackName    = "GoBuildExample";
            var attack        = new Attack(new IOutput[] {
                samplesOutput,
            }, name: attackName);

            var resourceFilePath = Path.Join(MyWarez.Core.Constants.ResourceDirectory, "calc.go");
            var resourceText     = File.ReadAllText(resourceFilePath);
            // Wrapper around single file go
            var goScript = new GoScript(resourceText);
            // Nonfunctional changes are made to the script so that the hash is different with every build
            var goExe64 = GoBuild.BuildExeX64(goScript);

            samplesOutput.Add("goCalc64.exe", goExe64);

            // Go build command errors out

            /*
             * var goExe86 = GoBuild.BuildExeX86(goScript);
             * samplesOutput.Add("goCalc86.exe", goExe86);
             *
             * var goDll64 = GoBuild.BuildDllX64(goScript, exportedFunctionName: "Pineapple");
             * samplesOutput.Add("goCalc64.dll", goDll64);
             */

            attack.Generate();
            return(attack);
        }
Пример #2
0
 void Start()
 {
     goButton      = FindObjectOfType <GoScript> ();
     stageSelecter = FindObjectOfType <StageSelecter>();
     gManager      = FindObjectOfType <GlobalGameManager>();
     if (isFirst)
     {
         stageSelecter.target   = this.transform;
         stageSelecter.movingTo = this.transform;
     }
     curTransform = this.transform.localScale.x;
 }