예제 #1
0
 public static void UpdateNightvision()
 {
     if ((Global.VisSettings.NightVision && Global.VisualsEnabled && !Global.AllOff) && !Hooks.askScreenshot.NeedingSpy)
     {
         if (LevelLighting.vision != ELightingVision.MILITARY)
         {
             LevelLighting.vision = ELightingVision.MILITARY;
             LevelLighting.updateLighting();
             LevelLighting.updateLocal();
             PlayerLifeUI.updateGrayscale();
             Global.LastUsedNight = true;
         }
     }
     else
     {
         if (Global.LastUsedNight)
         {
             LevelLighting.vision = ELightingVision.NONE;
             LevelLighting.updateLighting();
             LevelLighting.updateLocal();
             PlayerLifeUI.updateGrayscale();
             Global.LastUsedNight = false;
         }
     }
 }
예제 #2
0
        private void Update()
        {
            byte b;
            byte b2;

            if (Regions.tryGetCoordinate(base.transform.position, out b, out b2) && (b != this.region_x || b2 != this.region_y))
            {
                byte region_x = this.region_x;
                byte region_y = this.region_y;
                this._region_x = b;
                this._region_y = b2;
                if (this.onRegionUpdated != null)
                {
                    this.onRegionUpdated(region_x, region_y, b, b2);
                }
            }
            byte b3;

            LevelNavigation.tryGetBounds(base.transform.position, out b3);
            if (b3 != this.bound)
            {
                byte bound = this.bound;
                this._bound = b3;
                if (this.onBoundUpdated != null)
                {
                    this.onBoundUpdated(bound, b3);
                }
            }
            this.effectNode = null;
            for (int i = 0; i < LevelNodes.nodes.Count; i++)
            {
                Node node = LevelNodes.nodes[i];
                if (node.type == ENodeType.EFFECT)
                {
                    EffectNode effectNode = (EffectNode)node;
                    if (effectNode.shape == ENodeShape.SPHERE)
                    {
                        if ((base.transform.position - effectNode.point).sqrMagnitude < effectNode.editorRadius)
                        {
                            this.effectNode = effectNode;
                            break;
                        }
                    }
                    else if (effectNode.shape == ENodeShape.BOX && Mathf.Abs(base.transform.position.x - effectNode.point.x) < effectNode.bounds.x && Mathf.Abs(base.transform.position.y - effectNode.point.y) < effectNode.bounds.y && Mathf.Abs(base.transform.position.z - effectNode.point.z) < effectNode.bounds.z)
                    {
                        this.effectNode = effectNode;
                        break;
                    }
                }
            }
            AmbianceVolume effectNode2;

            if (this.effectNode == null && AmbianceUtility.isPointInsideVolume(base.transform.position, out effectNode2))
            {
                this.effectNode = effectNode2;
            }
            LevelLighting.updateLocal(MainCamera.instance.transform.position, 0f, this.effectNode);
        }
예제 #3
0
        void MiscPage()
        {
            GUI.Label(new Rect(415, 91, 100, 30), "<size=20>Misc:</size>");

            if (GUI.Button(new Rect(240, 153, 140, 30), "<size=13>No Rain</size>"))
            {
                LevelLighting.rainyness = ELightingRain.NONE;
            }
            if (GUI.Button(new Rect(240, 186, 140, 30), "<size=13>No Fog</size>"))
            {
                RenderSettings.fog = (!RenderSettings.fog);
            }
            if (GUI.Button(new Rect(240, 219, 140, 30), "<size=13>No Water</size>"))
            {
                if (Altitude == 0f)
                {
                    Altitude = LevelLighting.seaLevel;
                }

                LevelLighting.seaLevel = LevelLighting.seaLevel == 0f ? Altitude : 0f;
            }

            GUI.Label(new Rect(383, 120, 140, 35), $"<size=14>Night Vision: {Nv}</size>");
            if (GUI.Button(new Rect(383, 153, 140, 30), "<size=13>Military</size>"))
            {
                Nv = NvType.Military;

                LevelLighting.vision = ELightingVision.MILITARY;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }
            if (GUI.Button(new Rect(383, 186, 140, 30), "<size=13>Civilian</size>"))
            {
                Nv = NvType.Civilian;

                LevelLighting.vision = ELightingVision.CIVILIAN;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }
            if (GUI.Button(new Rect(383, 219, 140, 30), "<size=13>None</size>"))
            {
                Nv = NvType.None;

                LevelLighting.vision = ELightingVision.NONE;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }
        }
예제 #4
0
        public void Update()
        {
            if (Injections.Overrides.PL.tmp_screen)
            {
                Information.beingScreened = true;
                if (dManager.highlights.Count > 0)
                {
                    foreach (HighlightType g in dManager.highlights)
                    {
                        if (g.h != null)
                        {
                            GameObject.Destroy(g.h);
                        }
                        dManager.highlights.Remove(g);
                    }
                }
                LevelLighting.vision = ELightingVision.NONE;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
                ComponentManager.hack_Weapons.hideSpread();

                Player.player.StartCoroutine("takeScreenshot");
                lastScreenshot = DateTime.Now;
                Injections.Overrides.PL.tmp_screen = false;
            }

            if (Information.beingScreened && !Injections.Overrides.PL.tmp_screen && ((DateTime.Now - lastScreenshot).TotalMilliseconds > 3000))
            {
                Information.beingScreened = false;
                string say = "";
                if (Injections.Overrides.PL.tmp_calls > 5)
                {
                    say = "Someone has used Observetory on you!";
                }
                else
                {
                    say = "Someone has used Spy on you!";
                }
                ChatManager.list(Provider.client, EChatMode.SAY, Color.magenta, say);
                Injections.Overrides.PL.tmp_calls = 0;
            }
        }
예제 #5
0
        public void OnGUI()
        {
            if (isOn && ctrl_Connector.isOn)
            {
                window_Main = GUILayout.Window(ctrl_Connector.id_Player, window_Main, onWindow, "Player Hack Menu");
            }

            if (Event.current.type == EventType.Repaint)
            {
                if (nightvision_military)
                {
                    LevelLighting.vision = ELightingVision.MILITARY;
                    LevelLighting.updateLighting();
                    LevelLighting.updateLocal();
                    PlayerLifeUI.updateGrayscale();
                    prev_night = true;
                }
                else if (nightvision_civilian)
                {
                    LevelLighting.vision = ELightingVision.CIVILIAN;
                    LevelLighting.updateLighting();
                    LevelLighting.updateLocal();
                    PlayerLifeUI.updateGrayscale();
                    prev_night = true;
                }
                else
                {
                    if (prev_night)
                    {
                        LevelLighting.vision = ELightingVision.NONE;
                        LevelLighting.updateLighting();
                        LevelLighting.updateLocal();
                        PlayerLifeUI.updateGrayscale();
                        prev_night = false;
                    }
                }
            }
        }
예제 #6
0
 public void OnGUI()
 {
     if (Information.beingScreened)
     {
         return;
     }
     if (Event.current.type == EventType.Repaint)
     {
         if (nightvision_military)
         {
             LevelLighting.vision = ELightingVision.MILITARY;
             LevelLighting.updateLighting();
             LevelLighting.updateLocal();
             PlayerLifeUI.updateGrayscale();
             prev_night = true;
         }
         else if (nightvision_civilian)
         {
             LevelLighting.vision = ELightingVision.CIVILIAN;
             LevelLighting.updateLighting();
             LevelLighting.updateLocal();
             PlayerLifeUI.updateGrayscale();
             prev_night = true;
         }
         else
         {
             if (prev_night)
             {
                 LevelLighting.vision = ELightingVision.NONE;
                 LevelLighting.updateLighting();
                 LevelLighting.updateLocal();
                 PlayerLifeUI.updateGrayscale();
                 prev_night = false;
             }
         }
     }
 }
예제 #7
0
        // Token: 0x06000011 RID: 17 RVA: 0x00002CB4 File Offset: 0x00000EB4
        private void OnGUI()
        {
            if (Menu.MenuOpened != 1)
            {
                return;
            }
            GUI.skin = Menu.Skin;
            GUILayout.BeginArea(new Rect((float)(UnityEngine.Screen.width / 2 - 250), (float)(UnityEngine.Screen.height / 2 - 250), 700f, 700f), "Hake", GUI.skin.GetStyle("window"));
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            MainMenu.NoRecoil = GUILayout.Toggle(MainMenu.NoRecoil, "No recoil", new GUILayoutOption[0]);
            MainMenu.NoShake  = GUILayout.Toggle(MainMenu.NoShake, "No shake", new GUILayoutOption[0]);
            MainMenu.NoSpread = GUILayout.Toggle(MainMenu.NoSpread, "No spread", new GUILayoutOption[0]);
            this._zoom        = GUILayout.Toggle(this._zoom, "Enable FOV", new GUILayoutOption[0]);
            GUILayout.Space(50f);
            MainMenu.Aimbot_Enable  = GUILayout.Toggle(MainMenu.Aimbot_Enable, "Enable Aimbot", new GUILayoutOption[0]);
            MainMenu.Aimbot_Players = GUILayout.Toggle(MainMenu.Aimbot_Players, "At Players", new GUILayoutOption[0]);
            MainMenu.Aimbot_Zombies = GUILayout.Toggle(MainMenu.Aimbot_Zombies, "At Zombies", new GUILayoutOption[0]);
            MainMenu.Aimbot_Animals = GUILayout.Toggle(MainMenu.Aimbot_Animals, "At Animals", new GUILayoutOption[0]);

            GUILayout.Label(MainMenu.WebText, new GUILayoutOption[0]);
            GUILayout.Label("Unturned Hake", new GUILayoutOption[0]);
            GUILayout.EndVertical();
            GUILayout.BeginVertical(new GUILayoutOption[0]);

            if (GUILayout.Button("Ballistic Force off", new GUILayoutOption[0]))
            {
                DisableBallistic();
            }
            if (GUILayout.Button("Set day", new GUILayoutOption[0]))
            {
                LightingManager.time = (uint)(LightingManager.cycle * LevelLighting.transition);
            }
            if (GUILayout.Button("Night vision: " + this._nightVision, new GUILayoutOption[0]))
            {
                this._nightVision++;
                if (this._nightVision > 3)
                {
                    this._nightVision = 0;
                }
                LevelLighting.vision = (ELightingVision)this._nightVision;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }
            if (GUILayout.Button("No Respawn Timer", new GUILayoutOption[0]))
            {
                this.DisableTimers();
            }
            if (GUILayout.Button("No Fog" + Menu.GetToggleText(RenderSettings.fog), new GUILayoutOption[0]))
            {
                RenderSettings.fog = !RenderSettings.fog;
            }
            if (GUILayout.Button("No Rain", new GUILayoutOption[0]))
            {
                LevelLighting.rainyness = 0;
            }
            if (GUILayout.Button("Kill All Zombies", new GUILayoutOption[0]))
            {
                foreach (Zombie zombie in FindObjectsOfType <Zombie>())
                {
                    ZombieManager.sendZombieDead(zombie, new Vector3(0, 0, 0));
                }
            }

            GUILayout.Space(50f);


            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
            GUILayout.EndArea();

            GUILayout.BeginArea(new Rect((float)((UnityEngine.Screen.width / 2 - 250) + 720), (float)(UnityEngine.Screen.height / 2 - 250), 200f, 800f), "Friend Menu", GUI.skin.GetStyle("window"));
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.BeginVertical(new GUILayoutOption[0]);

            GUILayout.Label(FriendList, new GUILayoutOption[0]);
            if (GUILayout.Button("Refresh Friends List", new GUILayoutOption[0]))
            {
                CreateFriendButtons();
            }
            GUILayout.EndVertical();

            GUILayout.EndHorizontal();
            GUILayout.EndArea();
        }
예제 #8
0
        private void EnvironmentPage()
        {
            GUILayout.Space(2f);
            GUILayout.Label("Weather\n--------------------------------------");
            GUILayout.Space(2f);

            if (GUILayout.Button("No Rain"))
            {
                LevelLighting.rainyness = ELightingRain.NONE;
            }

            if (GUILayout.Button("No Fog"))
            {
                RenderSettings.fog = (!RenderSettings.fog);
            }

            if (GUILayout.Button("No Water"))
            {
                if (Altitude == 0f)
                {
                    Altitude = LevelLighting.seaLevel;
                }

                LevelLighting.seaLevel = LevelLighting.seaLevel == 0f ? Altitude : 0f;
            }

            GUILayout.Label("Time: " + LightingManager.time);
            LightingManager.time = (uint)Math.Round(GUILayout.HorizontalSlider(LightingManager.time, 0, 3600));

            GUILayout.Space(2f);
            GUILayout.Label("--------------------------------------");
            GUILayout.Space(2f);


            GUILayout.Space(4f);

            GUILayout.Label($"Night Vision: {Nv}");

            GUILayout.Space(2f);


            if (GUILayout.Button("Military"))
            {
                Nv = NvType.Military;

                LevelLighting.vision = ELightingVision.MILITARY;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }

            if (GUILayout.Button("Civilian"))
            {
                Nv = NvType.Civilian;

                LevelLighting.vision = ELightingVision.CIVILIAN;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }

            if (GUILayout.Button("None"))
            {
                Nv = NvType.None;

                LevelLighting.vision = ELightingVision.NONE;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }

            GUILayout.Space(10f);
            GUILayout.Label(" Get High\n --------------------------------------");
            GUILayout.Space(2f);

            if (GUILayout.Button("Get High (10 sec)"))
            {
                Player.player.life.askView(10);
            }
            if (GUILayout.Button("Get High (30 Sec)"))
            {
                Player.player.life.askView(30);
            }
            if (GUILayout.Button("Get High (1 min)"))
            {
                Player.player.life.askView(60);
            }
            if (GUILayout.Button("Get High (5 mins)"))
            {
                Player.player.life.askView(255);
            }
        }