// add the glow componet to a object and assigns it a random glow color and tells it not to glow private void AddGlows(GameObject obj) { GlowObject go = obj.AddComponent <GlowObject>(); go.glowColor = UnityEngine.Random.ColorHSV(0.2F, 1, 0.2F, 1, 0.2F, 1, 0, 0); go.Glow(false); }
void Start() { objectClicker = FindObjectOfType <ObjectClicker>(); glowObject = FindObjectOfType <GlowObject>(); ActiveModel = Models[0]; ActiveModel.GetComponent <DisassembleObject>().Enable(); }
private void OnTriggerExit(Collider other) { GlowObject glowObj = gameObject.GetComponent <GlowObject>(); if (glowObj != null) { glowObj.TurnOffGlow(); } }
void Start() { player = GameObject.FindGameObjectWithTag("Player")?.GetComponent <PlayerController>(); glowObj = gameObject.GetComponent <GlowObject>(); if (player == null) { Debug.Log("No player found. Put the 'Player' tag on the player!"); } }
public void AddGrowObject(GameObject obj) { Renderer renderer = obj.GetComponent <Renderer>(); if (renderer != null && renderer.material.GetTag("RenderEffect", false) == "Glow2") { Material gmat = Instantiate(GlowObjectMaterial) as Material; gmat.color = renderer.material.GetColor("_GlowColor"); GlowObject glowObj = new GlowObject(obj, renderer.material, gmat, obj.layer); GlowObjects.Add(glowObj); } }
/// <summary> /// Remove object from list of glowing objects to be rendered. Updates (rebuilds) buffer. /// </summary> public void DeRegisterObject(GlowObject _glowObj) { glowingObjects.Remove(_glowObj); if (glowingObjects.Count < 1) //Clearing for (almost)zero overhead when there's no active glow { glowBuff.Clear(); } else { RebuildCommandBuffer(); } }
// Use this for initialization void Start() { GameObject[] targets = GameObject.FindGameObjectsWithTag("Target"); foreach (GameObject target in targets) { GlowObject glow = target.GetComponent <GlowObject>(); targetStates.Add(glow, glow.isFound); if (glow.isFound) { Debug.LogWarning("Target object " + target.name + " is starting the game marked as already found. That's weird."); } } }
void Start() { movt = ((MovieTexture)transform.root.GetComponentInChildren <Renderer>().material.mainTexture); ranges = new Ranges(stepCount); parentTrans = transform.parent; glowPick = GetComponentInChildren <GlowObject>(); prb = transform.root.GetComponent <Rigidbody>(); rb = GetComponent <Rigidbody>(); //this is just the pick (for changing colors, etc) pickObject = transform.GetChild(0).gameObject; por = pickObject.GetComponent <Renderer>(); lowRange = (int)Mathf.Floor(Random.Range(-angleThresh + stepCount, angleThresh - stepCount)); highRange = lowRange + stepCount; }
private void Start() { if (GetComponent <BoxCollider>()) { myCollider = GetComponent <BoxCollider>(); myCollider.enabled = false; } myObjectPart = GetComponentInParent <ObjectPart>(); myGlowObject = GetComponent <GlowObject>(); gameObject.layer = LayerMask.NameToLayer("ObjectPart"); startLocalPosition = transform.localPosition; startLocalRotation = transform.localRotation; }
void initGlowObjects() { foreach (GameObject obj in Object.FindObjectsOfType(typeof(GameObject))) { if (obj.activeInHierarchy) { Renderer renderer = obj.GetComponent <Renderer>(); if (renderer != null && renderer.material.GetTag("RenderEffect", false) == "Glow2") { Material gmat = Instantiate(GlowObjectMaterial) as Material; gmat.color = renderer.material.GetColor("_GlowColor"); GlowObject glowObj = new GlowObject(obj, renderer.material, gmat, obj.layer); GlowObjects.Add(glowObj); //Debug.Log(obj.name); } } } }
public override void OnInspectorGUI() { GlowObject glowObj = (GlowObject)target; DrawDefaultInspector(); GUILayout.Space(10); if (GUILayout.Button("Start Glowing")) { glowObj.Glow(true); } GUILayout.Space(10); if (GUILayout.Button("Stop Glowing")) { glowObj.Glow(false); } }
static void SetHalo(GameObject o, bool on) { GlowObject glow = o.GetComponent <GlowObject>(); if (glow == null) { glow = o.GetComponentsInChildren <GlowObject>()[0]; } if (glow != null) { if (on) { glow.Activate(); } else { glow.Deactivate(); } } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { if (activateOnEnter) { Activate(); } else { if (player.interacting) { Activate(); } } } GlowObject glowObj = gameObject.GetComponent <GlowObject>(); if (glowObj != null) { glowObj.TurnOnGlow(); } }
public static void MainLoop() { while (true) { int GlowBase = ReadMemory <int>((int)g_pClient + dwGlowObjectManager); int Local = ReadMemory <int>((int)g_pClient + dwLocalPlayer); int LocalTeam = ReadMemory <int>(Local + m_iTeamNum); int LocalFlash = ReadMemory <int>(Local + m_flFlashMaxAlpha); int LocalFov = ReadMemory <int>(Local + m_iFOVStart); int LocalScope = ReadMemory <int>(Local + m_bIsScoped); GlowObject GlowObj = new GlowObject(); #region EntityLoop for (var i = 0; i <= 64; i++) { int EntBase = ReadMemory <int>((int)g_pClient + dwEntityList + i * 0x10); if (EntBase == 0) { continue; } int Dormant = ReadMemory <int>(EntBase + m_bDormant); if (Dormant == 1) { continue; } int Team = ReadMemory <int>(EntBase + m_iTeamNum); int GlowIndex = ReadMemory <int>(EntBase + m_iGlowIndex); int Spotted = ReadMemory <int>(EntBase + m_bSpotted); bool Visible = IsVisible(Local, EntBase); var M8 = (Team == LocalTeam); if (Globals.bRadar) { if (Spotted == 0 && !M8) { WriteMemory <int>(EntBase + m_bSpotted, 1); } } if (Globals.bGlow) { GlowObj = ReadMemory <GlowObject>(GlowBase + GlowIndex * 0x38); if (Globals.iGlowMode == 1 && M8) { continue; } if (Globals.iGlowMode == 2 && !Visible) { continue; } GlowObj.r = M8 ? 0.0f : 1.0f; GlowObj.g = M8 ? 1.0f : 0.0f; GlowObj.b = 0.0f; GlowObj.a = 0.7f; GlowObj.m_bRenderWhenOccluded = true; GlowObj.m_bRenderWhenUnoccluded = false; GlowObj.m_bFullBloom = false; WriteMemory <GlowObject>(GlowBase + GlowIndex * 0x38, GlowObj); } #region Trigger Bot var iCrosshairIndex = ReadMemory <int>(EntBase + m_iCrosshairId); var iCrossBase = ReadMemory <int>((int)g_pClient + dwEntityList + (iCrosshairIndex - 1) * 0x10); var iCrossTeam = ReadMemory <int>(iCrossBase + m_iTeamNum); var HoldingKey = GetAsyncKeyState(Globals.iTriggerKey); var M8onCross = (iCrossTeam == LocalTeam); if (((HoldingKey & 0x8000) > 0) && (iCrosshairIndex > 0 && iCrosshairIndex < 65)) { if (M8onCross) { continue; } Thread.Sleep(20); // delay before shoot in ms WriteMemory <int>((int)g_pClient + dwForceAttack, 5); Thread.Sleep(80); // delay between shoots in ms WriteMemory <int>((int)g_pClient + dwForceAttack, 4); Thread.Sleep(5); // delay after shoot in ms } #endregion } #endregion #region NoEntityLoopThings if (Globals.bNoflash) { if (LocalFlash > 1) { WriteMemory <int>(Local + m_flFlashMaxAlpha, 0); } } if (Globals.bFov) { if (LocalScope == 0) { if (LocalFov != 90) { WriteMemory <int>(Local + m_iFOVStart, 90); } } } #endregion Thread.Sleep(5); // to avoid huge usage CPU } }
public static void WallHackThread() { while (true) { if (!Globals.WallHackEnabled) { Thread.Sleep(Globals.IdleWait); continue; } if (!EngineDLL.InGame) { Thread.Sleep(Globals.IdleWait); continue; } int mp = EngineDLL.MaxPlayer; for (int i = 0; i < mp; i++) { CBaseEntity baseEntity = entityList[i]; if (baseEntity == null) { continue; } CCSPlayer entity = new CCSPlayer(baseEntity); if (entity == null) { continue; } if (entity.Dormant) { continue; } if (entity.Health <= 0) { continue; } if (entity.Team != CBasePlayer.Team) { GlowObject glowObject = entityList[i].GlowObject; glowObject.r = Globals.WallHackEnemy.R / 255; glowObject.g = Globals.WallHackEnemy.G / 255; glowObject.b = Globals.WallHackEnemy.B / 255; glowObject.a = 0.7f; glowObject.m_bFullBloom = Globals.WallHackFullEnabled; glowObject.m_nGlowStyle = Globals.WallHackGlowOnly ? 1 : 0; glowObject.m_bRenderWhenOccluded = true; glowObject.m_bRenderWhenUnoccluded = false; entityList[i].GlowObject = glowObject; } else { GlowObject glowObject = entityList[i].GlowObject; glowObject.r = 0 / 255; glowObject.g = 255 / 255; glowObject.b = 0 / 255; glowObject.a = 0.7f; glowObject.m_bFullBloom = Globals.WallHackFullEnabled; glowObject.m_nGlowStyle = Globals.WallHackGlowOnly ? 1 : 0; glowObject.m_bRenderWhenOccluded = true; glowObject.m_bRenderWhenUnoccluded = false; entityList[i].GlowObject = glowObject; } } Thread.Sleep(Globals.UsageDelay); } }
public static void start() { while (true) { int Local = Memory.ReadMemory <int>((int)Memory.g_pClient + Offsets.dwLocalPlayer); int LocalTeam = Memory.ReadMemory <int>(Local + Offsets.m_iTeamNum); bool LocalScope = Memory.ReadMemory <bool>(Local + Offsets.m_bIsScoped); int LocalFlash = Memory.ReadMemory <int>(Local + Offsets.m_flFlashMaxAlpha); int LocalFlags = Memory.ReadMemory <int>(Local + Offsets.m_fFlags); int GlowBase = Memory.ReadMemory <int>((int)Memory.g_pClient + Offsets.dwGlowObjectManager); GlowObject GlowObj = new GlowObject(); { if (Settings.Flash.enabled == true) { Memory.WriteMemory <int>(Local + Offsets.m_flFlashMaxAlpha, 0); } else { Memory.WriteMemory <int>(Local + Offsets.m_flFlashMaxAlpha, 255); } } { if (Settings.Bunnyhop.enabled == true) { var bunnyhopKey = Imports.GetAsyncKeyState(Settings.Bunnyhop.key); //KEY NOT PRESSED / DOWN = 0; KEY PRESSED / DOWN = not 0 // == , != if ((bunnyhopKey & 0x8000) > 0) { if (LocalFlags == 257 || LocalFlags == 263 || LocalFlags == 1281 || LocalFlags == 1287) { Memory.WriteMemory <int>((int)Memory.g_pClient + Offsets.dwForceJump, 6); } } } } { for (int i = 0; i <= 64; i++) { int EntityBase = Memory.ReadMemory <int>((int)Memory.g_pClient + Offsets.dwEntityList + i * 0x10); int EntityTeam = Memory.ReadMemory <int>(EntityBase + Offsets.m_iTeamNum); int EntityHealth = Memory.ReadMemory <int>(EntityBase + Offsets.m_iHealth); bool EntitySpotted = Memory.ReadMemory <bool>(EntityBase + Offsets.m_bSpotted); int GlowIndex = Memory.ReadMemory <int>(EntityBase + Offsets.m_iGlowIndex); GlowObj = Memory.ReadMemory <GlowObject>(GlowBase + GlowIndex * 0x38); if (Settings.Glowteam.enabled == true) { if (EntityTeam == LocalTeam) { //TEAMMATE GlowObj.r = 0f; GlowObj.g = 0f; GlowObj.b = 1; } } if (Settings.Glowenemy.enabled == true) { if (EntityTeam != LocalTeam) { //ENEMY //HAS OVER 50HP RED //LESS THAN 50HP ORANGE - R = 1; G = 0.5; B = 0; // if ::: health == 0 ; health != 0 ; health > 50 || health < 50 if (EntityHealth > 50) { //OVER 50HP GlowObj.r = 1f; GlowObj.g = 0f; } else { //UNDER 50HP GlowObj.r = 1f; GlowObj.g = 0.4f; } GlowObj.b = 0f; } } //IF TEAMMATE: RED = 0; GREEN 0; BLUE = 1; //IF ENEMY: RED = 1; GREEN 0; BLUE = 0; // //ENEMY GLOW BY HEALTH GlowObj.a = 1f; GlowObj.m_bRenderWhenOccluded = true; GlowObj.m_bRenderWhenUnoccluded = false; GlowObj.m_bFullBloom = false; if (Settings.Glow.enabled == true) { Memory.WriteMemory <GlowObject>(GlowBase + GlowIndex * 0x38, GlowObj); } if (Settings.Radar.enabled == true) { if (EntityTeam != LocalTeam) { if (EntitySpotted == false) { Memory.WriteMemory <bool>(EntityBase + Offsets.m_bSpotted, true); } } } } } Thread.Sleep(1); } }
public static void EngineChams() { while (true) { // Check If Glow is Enabled if (Settings.m_bEngineChams) { for (var i = 0; i < 64; i++) { // Check If Our Entity Is Valid if (Arrays.Entity[i].m_iBase == 0) { continue; } if (Arrays.Entity[i].m_iBase == LocalPlayer.m_iBase) { continue; } if (Arrays.Entity[i].m_iHealth < 1) { continue; } if (Arrays.Entity[i].m_iDormant == 1) { continue; } Color Color = Arrays.Entity[i].m_iTeam != LocalPlayer.m_iTeam ? Color.FromArgb(255, 255, 0, 0) : Color.FromArgb(180, 0, 255, 0); GlowObject GlowObj = new GlowObject(); GlowObj = ManageMemory.ReadMemory <GlowObject>(LocalPlayer.m_iGlowBase + Arrays.Entity[i].m_iGlowIndex * 0x38); GlowObj.r = Color.R / 255; GlowObj.g = Color.G / 255; GlowObj.b = Color.B / 255; GlowObj.a = Color.A / 255; GlowObj.m_bRenderWhenOccluded = true; GlowObj.m_bRenderWhenUnoccluded = false; GlowObj.m_bFullBloom = false; //GlowObj.SplitScreenSlot = 0xFFFFFFFF; ManageMemory.WriteMemory <GlowObject>(LocalPlayer.m_iGlowBase + Arrays.Entity[i].m_iGlowIndex * 0x38, GlowObj); /* * ManageMemory.WriteMemory<float>(LocalPlayer.m_iGlowBase + Arrays.Entity[i].m_iGlowIndex * 0x38 + 0x4, (float)Color.R / 255); * ManageMemory.WriteMemory<float>(LocalPlayer.m_iGlowBase + Arrays.Entity[i].m_iGlowIndex * 0x38 + 0x8, (float)Color.G / 255); * ManageMemory.WriteMemory<float>(LocalPlayer.m_iGlowBase + Arrays.Entity[i].m_iGlowIndex * 0x38 + 0xC, (float)Color.B / 255); * ManageMemory.WriteMemory<float>(LocalPlayer.m_iGlowBase + Arrays.Entity[i].m_iGlowIndex * 0x38 + 0x10, 1.0f); * ManageMemory.WriteMemory<byte>(LocalPlayer.m_iGlowBase + Arrays.Entity[i].m_iGlowIndex * 0x38 + 0x24, 1); * * //GlowObj = ManageMemory.ReadMemory<GlowObject>(LocalPlayer.m_iGlowBase + Arrays.Entity[i].m_iGlowIndex * 0x38); */ } } Thread.Sleep(5); } }
/// <summary> /// Add object to list of glowing objects to be rendered. /// </summary> public void RegisterObject(GlowObject _glowObj) { glowingObjects.Add(_glowObj); RebuildCommandBuffer(); }
private void Start() { glowControl = GetComponent <GlowObject>(); }