Beispiel #1
0
        public override MethodDefinition[] patchedMethods()
        {
            MethodDefinition DrawHeaderButtons   = Hooks.getMethDef(Hooks.getTypeDef(assembly, "LobbyMenu"), "drawHeaderButtons");
            MethodDefinition GetButtonPositioner = null;

            foreach (MethodDefinition def in (Hooks.getTypeDef(assembly, "LobbyMenu")).Methods)
            {
                if (def.Name.Equals("getButtonPositioner") && def.Parameters [0].ParameterType.Name.Equals("MockupCalc"))
                {
                    GetButtonPositioner = def;
                }
            }
            if (GetButtonPositioner == null && DrawHeaderButtons == null)
            {
                return new MethodDefinition[] { }
            }
            ;
            if (GetButtonPositioner == null)
            {
                Console.WriteLine("ERROR: unable to find Method");

                return(new MethodDefinition[] { DrawHeaderButtons });
            }
            else
            {
                return(new MethodDefinition[] { DrawHeaderButtons, GetButtonPositioner });
            }
        }
        public override Mono.Cecil.MethodDefinition[] patchedMethods()
        {
            MethodDefinition PopupOk = Hooks.getMethDef(Hooks.getTypeDef(assembly, "Popups"), "OnGUI");

            if (PopupOk == null)
            {
                return new MethodDefinition[] { }
            }
            ;
            return(new MethodDefinition[] { PopupOk });
        }
Beispiel #3
0
        public override MethodDefinition[] patchedMethods()
        {
            TypeDefinition settingsMenu = Hooks.getTypeDef(assembly, "SettingsMenu");

            return(new MethodDefinition[] {
                Hooks.getMethDef(settingsMenu, "Init"),
                Hooks.getMethDef(settingsMenu, "OnGUI"),
                Hooks.getMethDef(settingsMenu, "OnDestroy"),
                Hooks.getMethDef(Hooks.getTypeDef(assembly, "SceneLoader"), "loadScene"),
                Hooks.getMethDef(Hooks.getTypeDef(assembly, "LobbyMenu"), "isSceneJumpValid")
            });
        }
        public override MethodDefinition[] patchedMethods()
        {
            MethodDefinition PopupOk = Hooks.getMethDef(Hooks.getTypeDef(assembly, "Login"), "PopupOk");

            return(new MethodDefinition[] { PopupOk });           //, Name};
        }