private void Awake() { lr = GetComponent <LineRenderer>(); grappleGun = GetComponent <GrappleGun>(); gunRotation = GetComponent <GunRotation>(); gun = GetComponent <Gun>(); }
/// <summary> /// Delete the grapple hook. /// </summary> public void Delete() { try { //if (Rope == null) //{ // return; //} //if (Character != null) //{ // Rope.DetachEntity(Character); //} if (Hook != null) { //Rope.DetachEntity(Hook); Hook.Delete(); } if (GrappleGun != null) { GrappleGun.Delete(); } //Rope.Delete(); } catch { // ignored } }
// Use this for initialization void Start() { Cursor.lockState = CursorLockMode.Locked; character = GetComponent <Rigidbody>(); mouseLook = GetComponent <CustomMouseLook>(); rotator = GetComponent <CharacterRotator>(); sMovement = GetComponent <SurfaceMovement>(); grappleGun = GetComponent <GrappleGun>(); if (grappleGun) { grappleGun.controller = this; } grappled = false; justFired = false; }
// private GameObject hookedPrefab; void Awake() {//must change everything to an array MainGunScript = guns[0].GetComponent <GrappleGun>(); AIgun1Script = guns[1].GetComponent <AIGun>(); AIgun2Script = guns[2].GetComponent <AIGun>(); AIgun3Script = guns[3].GetComponent <AIGun>(); AIgun4Script = guns[4].GetComponent <AIGun>(); AIgun5Script = guns[5].GetComponent <AIGun>(); _isHooked = false; isAIDropping = false; maxTime = UnityEngine.Random.Range(4, 6); if (thisCube == null) { thisCube = transform; } spawnLocation = thisCube.transform.position; Respawn(); }
// Use this for initialization void Start() { Cursor.lockState = CursorLockMode.Locked; character = GetComponent<Rigidbody>(); mouseLook = GetComponent<CustomMouseLook>(); rotator = GetComponent<CharacterRotator>(); sMovement = GetComponent<SurfaceMovement>(); grappleGun = GetComponent<GrappleGun>(); if (grappleGun) grappleGun.controller = this; grappled = false; justFired = false; }