Esempio n. 1
0
    public override void _Ready()
    {
        Input.SetMouseMode(Input.MouseMode.Hidden);

        levelManager = LevelManager.Init(this, GetNode <Round>("Round"));
        winDelay     = GetNode <Timer>("WinDelay");

        //todo: UI manager should handle it
        boardIcon = GD.Load <PackedScene>("res://Resources/UI/BoardIcon.tscn");

        ui             = GetNode <Control>("UI");
        livesContainer = ui.GetNode <Control>("LivesContainer");
        foreach (var i in Enumerable.Range(1, NumberOfLives))
        {
            IncreaseNumberOfLifeIcons();
        }

        highScore      = GetHighscore();
        scoreLabel     = GetNode <Control>("UI").GetNode <RichTextLabel>("Score");
        highScoreLabel = GetNode <Control>("UI").GetNode <RichTextLabel>("HighScore");
        gm             = GetNode <GodMode>("GodMode");
        SetHighscoreText(highScore);
        levelManager.StartLoading(Level);

        PauseMode = PauseModeEnum.Process;
    }
Esempio n. 2
0
        public bool Start()
        {
            if ((_hWnd = WinAPI.FindWindowByCaption(_hWnd, GameTitle)) == IntPtr.Zero)
            {
                return(false);
            }

            Process[] processes = Process.GetProcessesByName(ProcessName);
            bool      temp      = Attach(processes[0]);

            if (temp)
            {
                GodMode         = new GodMode(_baseAddress, _memory);
                SpeedMultiplier = new SpeedMultiplier(_baseAddress, _memory);
                InfiniteAmmo    = new InfiniteAmmo(_baseAddress, _memory);
                MoneyHack       = new SpawnMoney(_baseAddress, _memory);
                MiscFeatures    = new MiscFeatures(_baseAddress, _memory);
                ZombieHack      = new ZombieHack(_playerPedPtr, _zmBotListBase, _zmGlobalBase, _memory);
                XpMultiplier    = new XpMultiplier(_baseAddress, _memory);
                CamoFeatures    = new CamoFeatures(_baseAddress, _zmBotListBase, _zmGlobalBase, _memory);

                return(true);
            }

            return(false);
        }
Esempio n. 3
0
 public override void OnInspectorGUI()
 {
     if (GUILayout.Button("Add some gold"))
     {
         GodMode godMode = (GodMode)target;
         godMode.AddSomeGold();
     }
 }
Esempio n. 4
0
        private void clickScan(object sender, EventArgs e)
        {
            Thread.Sleep(100);

            // GodMode Scan
            godMode = new GodMode();
            godMode.ScanAobs(m);

            // Unlimited Mana Scan
            unlimitedMana = new UnlimitedMana();
            unlimitedMana.ScanAobs(m);
        }
Esempio n. 5
0
 private void Awake()
 {
     if (GodMode.instance == null)
     {
         GodMode.instance = this;
         GameObject.DontDestroyOnLoad(this.gameObject);
     }
     else
     {
         GodMode.Destroy(this.gameObject);
     }
 }
    public override void OnInspectorGUI()
    {
        ef.start();
        GodMode tmp = (GodMode)target;

        ef.write("speed:"); ef.edit(ref tmp.speed); ef.newLine();
        ef.write("sensitivity:"); ef.edit(ref tmp.sensitivity); ef.newLine();

        ef.write("WASD - move"); ef.newLine();
        ef.write("Shift, Space - Dwn, Up"); ef.newLine();
        ef.write("RMB - look around"); ef.newLine();

        ef.newLine();
    }
Esempio n. 7
0
 private void Start()
 {
     inst = this;
 }
Esempio n. 8
0
 private void OnEnable()
 {
     inst = this;
 }
 public void EnableGodMode()
 {
     mGodMode = GodMode.ACTIVATED;
 }
Esempio n. 10
0
        public override void OnInspectorGUI() {

        
#if PEGI

              bool changes = false;

            painter = (PlaytimePainter)target;

            if  (painter.gameObject.IsPrefab()) {
                "Inspecting a prefab.".nl();
                return;
            }

            PainterCamera rtp = PainterCamera.Inst;

            if (!Cfg)
            {
                "No Config Detected".nl();
                return;
            }

           

            ef.start(serializedObject);
         



            if (!PlaytimePainter.IsCurrent_Tool()) {
                if (pegi.Click(icon.Off, "Click to Enable Tool", 25)) {
                    PlaytimeToolComponent.enabledTool = typeof(PlaytimePainter);//  customTools.Painter;
                    CloseAllButThis(painter);
                    painter.CheckPreviewShader();
                    PlaytimePainter.HideUnityTool();
                }
                painter.gameObject.end();
                return;
            } else {

                if ((IsCurrentTool() && (painter.terrain != null) && (Application.isPlaying == false) && (UnityEditorInternal.InternalEditorUtility.GetIsInspectorExpanded(painter.terrain) == true)) ||
                    (pegi.Click(icon.On.getIcon(), "Click to Disable Tool", 25))) {
                    PlaytimeToolComponent.enabledTool = null; //customTools.Disabled;
                    MeshManager.Inst.DisconnectMesh();
                    painter.SetOriginalShaderOnThis();
                    painter.UpdateOrSetTexTarget(TexTarget.Texture2D);
                    PlaytimePainter.RestoreUnityTool();
                }
            }

            painter.InitIfNotInited();

            ImageData image = painter.ImgData;

            Texture tex = painter.GetTextureOnMaterial();
            if ((!painter.meshEditing) && ((tex != null) && (image == null)) || ((image != null) && (tex == null)) || ((image != null) && (tex != image.texture2D) && (tex != image.CurrentTexture())))
                painter.textureWasChanged = true;


            changes = painter.PEGI_MAIN();
            image = painter.ImgData;


            if (painter.meshEditing || (PainterStuff.IsNowPlaytimeAndDisabled)) { painter.gameObject.end();  return; } 

            if ((painter.meshRenderer != null || painter.terrain != null) && !Cfg.showConfig) {

             
                    if (!painter.LockTextureEditing) {
                        ef.newLine();

                    if (!painter.IsTerrainControlTexture()) {

                        string Orig = "";

                        if (image.texture2D != null) {
                                Orig = image.texture2D.GetPathWithout_Assets_Word();
                                if ((pegi.Click(icon.Load, "Will reload " + Orig, 25))) {
                                    painter.ForceReimportMyTexture(Orig);
                                    image.SaveName = image.texture2D.name;
                                    GUI.FocusControl("dummy");
                                    if (painter.terrain != null)
                                        painter.UpdateShaderGlobals();
                                }
                            }


                        "Texture Name: ".edit(70, ref image.SaveName);

                        if (image.texture2D != null)
                        {

                            string Dest = painter.GenerateTextureSavePath();
                            bool existsAtDestination = painter.TextureExistsAtDestinationPath();
                            bool originalExists = (Orig != null);
                            bool sameTarget = originalExists && (Orig.Equals(Dest));
                            bool sameTextureName = originalExists && image.texture2D.name.Equals(image.SaveName);


                            if ((existsAtDestination == false) || sameTextureName)
                            {
                                if (ef.Click(Icons_MGMT.getIcon(sameTextureName ? icon.Save : icon.SaveAsNew), (sameTextureName ? "Will Update " + Orig : "Will save as " + Dest), 25))
                                {
                                    if (sameTextureName)
                                        painter.RewriteOriginalTexture();
                                    else
                                        painter.SaveTextureAsAsset(false);

                                    painter.OnChangedTexture_OnMaterial();
                                }
                            }
                            else if (existsAtDestination && (pegi.Click(icon.Save, "Will replace " + Dest, 25)))
                                painter.SaveTextureAsAsset(false);


                            ef.newLine();

                            if ((!sameTarget) && (!sameTextureName) && (string.IsNullOrEmpty(Orig) == false) && (ef.Click("Replace", "Will replace " + Orig + " with " + Dest)))
                                painter.RewriteOriginalTexture_Rename(image.SaveName);

                        }
                    }
                    ef.newLine();




                }
                ef.newLine();

                    pegi.Space();
                    pegi.newLine();

               

                    var mats = painter.GetMaterials();
                    if ((mats != null) && (mats.Length > 0))
                    {
                        int sm = painter.selectedSubmesh;
                        if (pegi.select(ref sm, mats))
                        {
                            painter.SetOriginalShaderOnThis();
                            painter.selectedSubmesh = sm;
                            painter.OnChangedTexture_OnMaterial();
                            image = painter.ImgData;
                            painter.CheckPreviewShader();
                        }
                    }


                    Material mater = painter.Material;

                    if (pegi.edit(ref mater))
                        painter.Material = mater;



                    if (icon.NewMaterial.Click("Instantiate Material", 25).nl())
                    {
                        changes = true;
                        painter.InstantiateMaterial(true);
                    }

                    // pegi.newLine();

                    if ((mats != null) && (mats.Length > 1))

                        "Auto Select Material:".toggle("Material will be changed based on the submesh you are painting on", 120,
                                                       ref painter.autoSelectMaterial_byNumberOfPointedSubmesh).nl();


                    pegi.nl();
                    ef.Space();
                    ef.newLine();

                    //      pegi.write("Tex:", "Texture field on the material", 30);

                    if (painter.SelectTexture_PEGI())
                    {

                        image = painter.ImgData;
                        if (image == null) painter.nameHolder = painter.gameObject.name + "_" + painter.MaterialTexturePropertyName;
                    }

                    if (image != null)
                        painter.UpdateTylingFromMaterial();

                    TextureSetterField();

                    if ((painter.IsTerrainControlTexture() == false))
                    {

                        bool isTerrainHeight = painter.IsTerrainHeightTexture();

                        int texScale = (!isTerrainHeight) ?
                             ((int)Mathf.Pow(2, PainterCamera.Data.selectedSize + minPow))

                            : (painter.terrain.terrainData.heightmapResolution - 1);

                        List<string> texNames = painter.GetMaterialTextureNames();

                        if (texNames.Count > painter.SelectedTexture)
                        {
                            string param = painter.MaterialTexturePropertyName;

                            if (pegi.Click(icon.NewTexture, (image == null) ? "Create new texture2D for " + param : "Replace " + param + " with new Texture2D " + texScale + "*" + texScale, 25).nl())
                            {
                                changes = true;
                                if (isTerrainHeight)
                                    painter.CreateTerrainHeightTexture(painter.nameHolder);
                                else
                                    painter.CreateTexture2D(texScale, painter.nameHolder, Cfg.newTextureIsColor);
                            }



                            if ((image == null) && (Cfg.moreOptions) && ("Create Render Texture".Click()))
                            {
                                changes = true;
                                painter.CreateRenderTexture(texScale, painter.nameHolder);
                            }

                            if ((image != null) && (Cfg.moreOptions))
                            {
                                if ((image.renderTexture == null) && ("Add Render Tex".Click()))
                                {
                                    changes = true;
                                    image.AddRenderTexture();
                                }
                                if (image.renderTexture != null)
                                {

                                    if ("Replace RendTex".Click("Replace " + param + " with Rend Tex size: " + texScale))
                                    {
                                        changes = true;
                                        painter.CreateRenderTexture(texScale, painter.nameHolder);
                                    }
                                    if ("Remove RendTex".Click().nl())
                                    {
                                        changes = true;
                                        if (image.texture2D != null)
                                        {
                                            painter.UpdateOrSetTexTarget(TexTarget.Texture2D);
                                            image.renderTexture = null;
                                        }
                                        else
                                        {

                                            painter.RemoveTextureFromMaterial(); //SetTextureOnMaterial(null);
                                        }

                                    }
                                }
                            }
                        }
                        else
                            "No Material's Texture selected".nl();

                        pegi.nl();

                        if (image == null)
                            "_Name:".edit("Name for new texture", 40, ref painter.nameHolder).nl();



                        if (!isTerrainHeight)
                        {
                            "Color:".toggle("Will the new texture be a Color Texture", 40, ref Cfg.newTextureIsColor);
                            ef.write("Size:", "Size of the new Texture", 40);
                            if ((texSizes == null) || (texSizes.Length != range))
                            {
                                texSizes = new string[range];
                                for (int i = 0; i < range; i++)
                                    texSizes[i] = Mathf.Pow(2, i + minPow).ToString();
                            }

                            ef.select(ref PainterCamera.Data.selectedSize, texSizes, 60);
                        }
                        ef.newLine();
                    }

                    ef.newLine();
                    ef.tab();
                    ef.newLine();

                    List<ImageData> recentTexs;

                    string texName = painter.MaterialTexturePropertyName;

                    if ((texName != null) && (PainterCamera.Data.recentTextures.TryGetValue(texName, out recentTexs))
                        && ((recentTexs.Count > 1) || (painter.ImgData == null)))
                    {
                        ef.write("Recent Texs:", 60);
                        ImageData tmp = painter.ImgData;//.exclusiveTexture();
                        if (pegi.select(ref tmp, recentTexs))
                        {
                            painter.ChangeTexture(tmp.ExclusiveTexture());
                            changes = true;
                        }
                    }

                

                ef.Space();
                ef.newLine();
                ef.Space();


            }
           
            if (changes)
                painter.Update_Brush_Parameters_For_Preview_Shader();


            painter.gameObject.end();
#else
            if (GUILayout.Button("Enable PEGI"))
            {
                GodMode.EnablePegi();
            }

#endif
        }
 void Awake()
 {
     this.godMode = GameObject.FindObjectOfType <GodMode>();
 }
Esempio n. 12
0
        protected override void Enabled()
        {
            //Prepare & Start the God Mode Thread.
            God = new GodMode(this);

            //Add Commands
            AddCommand("!")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.LastCommand)
            .WithPermissionNode("essentials.!");

            AddCommand("bloodmoon")
            .WithAccessLevel(AccessLevel.OP)
            .Calls(Commands.BloodMoon)
            .WithPermissionNode("essentials.bloodmoon");

            AddCommand("slay")
            .WithAccessLevel(AccessLevel.OP)
            .Calls(Commands.Slay)
            .WithPermissionNode("essentials.slay");

            AddCommand("heal")
            .WithAccessLevel(AccessLevel.OP)
            .Calls(Commands.HealPlayer)
            .WithHelpText("Usage:    -goblin")
            .WithHelpText("          -frost")
            .WithPermissionNode("essentials.heal");

            AddCommand("invasion")
            .WithAccessLevel(AccessLevel.OP)
            .Calls(Commands.Invasion)
            .WithPermissionNode("essentials.invasion");

            AddCommand("ping")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.ConnectionTest_Ping)     //Need to make a single static function
            .WithPermissionNode("essentials.ping");

            AddCommand("pong")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.ConnectionTest_Ping)     //^^
            .WithPermissionNode("essentials.pong");

            AddCommand("suicide")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.Suicide)
            .WithPermissionNode("essentials.suicide");

            AddCommand("butcher")
            .WithAccessLevel(AccessLevel.OP)
            .WithDescription("Kill all NPC's within a radius")
            .WithHelpText("Usage:    butcher <radius>")
            .WithHelpText("          butcher <radius> -g[uide]")
            .Calls(Commands.Butcher)
            .WithPermissionNode("essentials.butcher");

            AddCommand("kit")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.Kit)
            .WithPermissionNode("essentials.kit");

            AddCommand("god")
            .WithAccessLevel(AccessLevel.OP)
            .Calls(Commands.GodMode)
            .WithPermissionNode("essentials.god");

            AddCommand("spawn")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.Spawn)
            .WithPermissionNode("essentials.spawn");

            AddCommand("info")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.Info)
            .WithPermissionNode("essentials.info");

            AddCommand("setspawn")
            .WithAccessLevel(AccessLevel.OP)
            .Calls(Commands.SetSpawn)
            .WithPermissionNode("essentials.setspawn");

            AddCommand("pm")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.MessagePlayer)
            .WithPermissionNode("essentials.pm");

            AddCommand("warp")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.Warp)
            .WithPermissionNode("essentials.warp");

            AddCommand("setwarp")
            .WithAccessLevel(AccessLevel.OP)
            .Calls(Commands.SetWarp)
            .WithPermissionNode("essentials.setwarp");

            AddCommand("mwarp")
            .WithAccessLevel(AccessLevel.OP)
            .Calls(Commands.ManageWarp)
            .WithPermissionNode("essentials.mwarp");

            AddCommand("warplist")
            .WithAccessLevel(AccessLevel.PLAYER)
            .Calls(Commands.ListWarp)
            .WithPermissionNode("essentials.warplist");

            Hook(HookPoints.PlayerEnteredGame, OnPlayerEnterGame);
            Hook(HookPoints.UnkownSendPacket, Net.OnUnkownPacketSend);
            Hook(HookPoints.WorldLoaded, OnWorldLoaded);
            Hook(HookPoints.PlayerLeftGame, OnPlayerLeave);
            Hook(HookPoints.WorldRequestMessage, OnWorldRequest);

            ProgramLog.Log(base.Name + " enabled.");
        }