/// <summary> /// Initializes the default values. /// </summary> public override void Awake() { base.Awake(); m_Camera = m_GameObject.GetCachedComponent <UnityEngine.Camera>(); #if ULTIMATE_CHARACTER_CONTROLLER_VR VRCameraIdentifier vrCamera; if ((vrCamera = m_GameObject.GetComponentInChildren <VRCameraIdentifier>()) != null) { // The VR camera will be used as the main camera. m_Camera.enabled = false; m_Camera = vrCamera.GetComponent <UnityEngine.Camera>(); m_VREnabled = true; } #endif m_AimAssist = m_GameObject.GetCachedComponent <AimAssist>(); m_Handler = m_GameObject.GetCachedComponent <CameraControllerHandler>(); m_CurrentLookOffset = m_LookOffset; // Initialize the springs. m_PositionSpring.Initialize(false, false); m_RotationSpring.Initialize(true, true); m_SecondaryPositionSpring.Initialize(false, false); m_SecondaryRotationSpring.Initialize(true, true); }
/// <summary> /// Attaches the monitor to the specified character. /// </summary> /// <param name="character">The character to attach the monitor to.</param> protected override void OnAttachCharacter(GameObject character) { if (m_Character != null) { EventHandler.UnregisterEvent <Item, int>(m_Character, "OnAbilityWillEquipItem", OnEquipItem); EventHandler.UnregisterEvent <Item, bool>(m_Character, "OnItemUpdateDominantItem", OnUpdateDominantItem); EventHandler.UnregisterEvent <Item, int>(m_Character, "OnAbilityUnequipItemComplete", OnUnequipItem); EventHandler.UnregisterEvent <Item, int>(m_Character, "OnInventoryRemoveItem", OnUnequipItem); EventHandler.UnregisterEvent <bool, bool>(m_Character, "OnAddCrosshairsSpread", OnAddCrosshairsSpread); EventHandler.UnregisterEvent <bool, bool>(m_Character, "OnAimAbilityStart", OnAim); EventHandler.UnregisterEvent <Vector3, Vector3, GameObject>(m_Character, "OnDeath", OnDeath); EventHandler.UnregisterEvent(m_Character, "OnRespawn", OnRespawn); ResetMonitor(); } base.OnAttachCharacter(character); if (m_Character == null) { return; } m_Camera = Shared.Camera.CameraUtility.FindCamera(m_Character); m_CameraController = m_Camera.gameObject.GetCachedComponent <CameraController>(); m_CameraController.SetCrosshairs(transform); m_AimAssist = m_Camera.GetComponent <AimAssist>(); m_CharacterTransform = m_Character.transform; m_CharacterLayerManager = m_Character.GetCachedComponent <CharacterLayerManager>(); m_CharacterLocomotion = m_Character.GetCachedComponent <UltimateCharacterLocomotion>(); m_PlayerInput = m_Character.GetCachedComponent <Shared.Input.PlayerInput>(); m_EnableImage = false; gameObject.SetActive(CanShowUI()); EventHandler.RegisterEvent <Item, int>(m_Character, "OnAbilityWillEquipItem", OnEquipItem); EventHandler.RegisterEvent <Item, bool>(m_Character, "OnItemUpdateDominantItem", OnUpdateDominantItem); EventHandler.RegisterEvent <Item, int>(m_Character, "OnAbilityUnequipItemComplete", OnUnequipItem); EventHandler.RegisterEvent <Item, int>(m_Character, "OnInventoryRemoveItem", OnUnequipItem); EventHandler.RegisterEvent <bool, bool>(m_Character, "OnAddCrosshairsSpread", OnAddCrosshairsSpread); EventHandler.RegisterEvent <bool, bool>(m_Character, "OnAimAbilityStart", OnAim); EventHandler.RegisterEvent <Vector3, Vector3, GameObject>(m_Character, "OnDeath", OnDeath); EventHandler.RegisterEvent(m_Character, "OnRespawn", OnRespawn); // An item may already be equipped. var inventory = m_Character.GetCachedComponent <Inventory.InventoryBase>(); if (inventory != null) { for (int i = 0; i < inventory.SlotCount; ++i) { var item = inventory.GetActiveItem(i); if (item != null) { OnEquipItem(item, i); } } } }
public override void Init(string objectID, BaseEntityController controller, bool weaponsActive, VesselShipStats shipStats, SceneController sceneController) { base.Init(objectID, controller, weaponsActive, shipStats, sceneController); //Create the aim assist object aimAssist = new AimAssist(); aimAssist.Init(this, sceneController.dynamicHud.aimSightUI); SetupWeapons(); }
/// <summary> /// A new ILookSource object has been attached to the character. /// </summary> /// <param name="lookSource">The ILookSource object attached to the character.</param> private void OnAttachLookSource(ILookSource lookSource) { if (lookSource == null) { m_AimAssist = null; } else { m_AimAssist = lookSource.GameObject.GetCachedComponent <AimAssist>(); } }
//AimAssist aimAssist; public override void Init(string objectID, BaseEntityController controller, bool weaponsActive, VesselShipStats shipStats, SceneController sceneController) { base.Init(objectID, controller, weaponsActive, shipStats, sceneController); aimAssist = new AimAssist(); aimAssist.Init(this, sceneController.dynamicHud.aimSightUI); targetChecker = new TargetDirectionCheck(); //shipTransforms = this.GetComponent<VesselTransforms>(); detectionDist = shipStats.maxProximityDist / 3; SetupWeapons(); }
public override void Init(string id, WeaponInfo weaponInfo, VesselAudioSystem audioSystem, AimAssist aimAssist, ProjectileType projectileType) { WeaponData weaponData = weaponInfo.weaponData; this.shooterID = id; this.audioSystem = audioSystem; this.fireRate = weaponData.fireRate; this.aimAssist = aimAssist; weaponSound = weaponData.fireSound; WeaponSettings settings = GameManager.Instance.gameSettings.weaponSettings; this.projectileData = settings.projectiles.Where(x => x.type == projectileType).First(); }
public static void Attach(System.Diagnostics.Process process, bool isInjected = false) { if (_isAttached) { return; } if (isInjected) { Memory = new LocalProcessMemory(process); } else { Memory = new ExternalProcessMemory(process); } Thread.Sleep(2000); Renderer = new Renderer(process); ClientBase = Memory.GetModule("client.dll").BaseAddress; EngineBase = Memory.GetModule("engine.dll").BaseAddress; Offsets.Initialize(); ClientState = Memory.Read <int>(EngineBase + Offsets.ClientState.Base); Objects = new ObjectManager(ClientBase + Offsets.Misc.EntityList); Box = new Box(); HeadHelper = new HeadHelper(); SkinChanger = new SkinChanger(); ControlRecoil = new Rcs(); TriggerBot = new TriggerBot(); KeyUtils = new KeyUtils(); BunnyJump = new BunnyJump(); SoundEsp = new SoundEsp(); Radar = new Radar(); NoFlash = new NoFlash(); AutoPistol = new AutoPistol(); Glow = new Glow(); AimAssist = new AimAssist(); var enginePtr = Memory.Read <IntPtr>(EngineBase + Offsets.ClientState.Base); if (enginePtr == IntPtr.Zero) { throw new Exception("Couldn't find Engine Ptr - are you sure your offsets are up to date?"); } Client = new GameClient(enginePtr); _isAttached = true; }
// Token: 0x0600049D RID: 1181 RVA: 0x00017A18 File Offset: 0x00015C18 public void run() { osu = new OsuManager(); getOsu(); DependencyContainer.Cache <OsuManager>(osu); aimAssist = new AimAssist(); relax = new Relax(); replayPlayer = new ReplayPlayer(); gui = new GUI(this); user = new User("", ""); gui.Text = "OsuBuddyCrack - " + this.user.getUsername(); gui.updateLoginGui(this.user.getUsername(), this.user.getSubscriptionExpirationDate()); Thread thread = new Thread((ThreadStart) delegate { gui.ShowDialog(null); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); StartTasks(); }
// Use this for initialization void Start() { //get controller, player and some scripts gameController = GameObject.FindWithTag("GameController"); cont = gameController.gameObject.GetComponent <Controller>(); player = GameObject.FindGameObjectWithTag("Player"); //rb.useGravity = false; power = 0.0f; // startPosition = new Vector3(-17.73f, 1.68f, 2.38f); loadSound(); if (!aimAssistScript) { aimAssistScript = GetComponent <AimAssist>(); } if (!powerBar) { powerBar = GameObject.FindGameObjectWithTag("ScoreBoard").GetComponent <Powerbar>(); } scoreBoardScript = GameObject.FindGameObjectWithTag("ScoreBoard").GetComponent <Scoreboard>(); }
/// <summary> /// Attaches the monitor to the specified character. /// </summary> /// <param name="character">The character to attach the monitor to.</param> protected override void OnAttachCharacter(GameObject character) { if (m_Character != null) { EventHandler.UnregisterEvent <Transform, bool>(m_Character, "OnCombatAimTargetChange", OnAimTargetChange); } base.OnAttachCharacter(character); if (m_Character == null) { return; } m_Camera = Shared.Camera.CameraUtility.FindCamera(m_Character); m_AimAssist = m_Camera.GetComponent <AimAssist>(); m_CharacterLocomotion = m_Character.GetCachedComponent <UltimateCharacterLocomotion>(); m_SoftAim = false; m_LockedAim = false; gameObject.SetActive(CanShowUI()); EventHandler.RegisterEvent <Transform, bool>(m_Character, "OnCombatAimTargetChange", OnAimTargetChange); }
// Use this for initialization void Start() { gameOver = false; if (!audioVolumeScript) { audioVolumeScript = GetComponent <AudioVolume>(); audioVolumeScript.SetVolumeLevels(); } if (!pauseMenuScript) { pauseMenuScript = GetComponent <PauseMenu>(); pauseMenuScript.HidePauseMenu(); } if (!splashScreensScript) { splashScreensScript = GetComponent <SplashScreens>(); } //setup scoreboard scoreboardScript = GameObject.FindGameObjectWithTag("ScoreBoard").GetComponent <Scoreboard>(); //set random player at start 0-100 for larger random chances currentPlayer = Random.Range(0, 100); if (currentPlayer < 50) { currentPlayer = 1; } else { currentPlayer = 2; } //get scripts from player and throw throwScript = player.GetComponent <Throw>(); pControls = player.GetComponent <PlayerControls>(); //spawn jack on initial run time spawnJack(); //setup jack camera jcam = GameObject.FindGameObjectWithTag("JackCamera"); jackCamera = jcam.GetComponent <JackCamera>(); jackCamera.getJack(); cameraOverlay = GameObject.FindGameObjectWithTag("Screen"); cameraOverlay2 = GameObject.FindGameObjectWithTag("Screen2"); camAlt = player.GetComponent <CameraView>(); //Aim Assist aimAssistScript = player.GetComponent <AimAssist>(); //Faultboxes faultBoxes = GameObject.FindGameObjectWithTag("FaultBoxes"); //Populate list with FaultBoxes scripts foreach (FaultBoxes fault in faultBoxes.GetComponentsInChildren <FaultBoxes>()) { faultBoxList.Add(fault); } scoreboardScript.UpdateScoreboard(); //get the music player musicSource = GameObject.FindGameObjectWithTag("MusicPlayer"); splashScreensScript.GameStartPanel(); }
public virtual void Init(string id, WeaponInfo weaponInfo, VesselAudioSystem audioSystem, AimAssist aimAssist, ProjectileType projectileType) { }
// Use this for initialization private void Awake() { if (!gameController) { gameController = GetComponent <Controller>(); } if (!crowdCheerAudioScript) { crowdCheerAudioScript = GameObject.FindGameObjectWithTag("CrowdAudioPlayer").GetComponent <CrowdCheerAudio>(); } if (!aimAssistScript) { aimAssistScript = GameObject.FindGameObjectWithTag("Player").GetComponent <AimAssist>(); } if (!pauseMenuScript) { pauseMenuScript = GetComponent <PauseMenu>(); } //Load in player change panel if it isnt already if (!playerChangePanel) { playerChangePanel = GameObject.FindGameObjectWithTag("PlayerChangePanel"); } //Load in images foreach (Image im in playerChangePanel.GetComponentsInChildren <Image>()) { if (!im.CompareTag("PlayerChangePanel")) { playerChangePanelImages.Add(im); } } //Load in sprites foreach (Object sprite in Resources.LoadAll("Letters", typeof(Sprite))) { chasLetterSprites.Add((Sprite)sprite); } //Load panels if (!gameStartPanel) { gameStartPanel = GameObject.FindGameObjectWithTag("GameStartPanel"); } //Load images foreach (Image im in GameObject.FindGameObjectWithTag("GameStartPanelP1").GetComponentsInChildren <Image>()) { if (!im.CompareTag("GameStartPanelP1")) { gameStartPanelPlayer1Images.Add(im); } } //Load images foreach (Image im in GameObject.FindGameObjectWithTag("GameStartPanelP2").GetComponentsInChildren <Image>()) { if (!im.CompareTag("GameStartPanelP2")) { gameStartPanelPlayer2Images.Add(im); } } if (!gameStartPanelPlayer1Logo) { gameStartPanelPlayer1Logo = GameObject.FindGameObjectWithTag("Player1Logo").GetComponent <Image>(); } if (!gameStartPanelPlayer2Logo) { gameStartPanelPlayer2Logo = GameObject.FindGameObjectWithTag("Player2Logo").GetComponent <Image>(); } if (!roundOverPanel) { roundOverPanel = GameObject.FindGameObjectWithTag("RoundOverPanel"); } foreach (Image im in roundOverPanel.GetComponentsInChildren <Image>()) { if (!im.CompareTag("RoundOverPanel")) { roundOverPanelImages.Add(im); } } if (!gameOverPanel) { gameOverPanel = GameObject.FindGameObjectWithTag("GameOverPanel"); } foreach (Image im in gameOverPanel.GetComponentsInChildren <Image>()) { if (!im.CompareTag("GameOverPanel")) { gameOverPanelImages.Add(im); } } foreach (Image im in playerTurnPrompt.GetComponentsInChildren <Image>()) { if (!im.CompareTag("PlayerTurnPrompt")) { playerTurnPromptPlayerNameImages.Add(im); } } //Disable all panels playerChangePanel.SetActive(false); roundOverPanel.SetActive(false); gameOverPanel.SetActive(false); playerTurnPrompt.SetActive(false); videoObject.SetActive(false); }