// void SetCursorState() // { // // } void Start() { Time.timeScale = 1; if (shotsDisplay != null) { shotsDisplay.SetActive(false); } canvas = GetComponent <Canvas>(); canvas.enabled = false; if (SceneManager.GetActiveScene().name != "Intro Scene") { //eventSystem.SetActive (false); // if(SceneManager.GetActiveScene().name != "CapMultiplayer") // { dannyCameraBase = gmobj.dannyContainer.GetComponentInChildren <FreeCameraLook> ().gameObject; dannyShutCameraOff = dannyCameraBase.GetComponent <FreeCameraLook>(); shutWeaponsOff = gmobj.danny.GetComponent <DannyWeaponScript>(); strongmanCameraBase = gmobj.strongmanContainer.GetComponentInChildren <FreeCameraLook> ().gameObject; strongmanCameraOff = strongmanCameraBase.GetComponent <FreeCameraLook> (); // } // else if(SceneManager.GetActiveScene().name == "CapMultiplayer") // { // // Debug.Log ("This is a network game!!!"); // } // sfxSlider.value = PersistThroughScenes.sfxVolume; // musicSlider.value = PersistThroughScenes.musicVolume; } sfxSlider.enabled = false; musicSlider.enabled = false; quit.enabled = false; }
void Start() { if (GetComponent <PlayerController>()) { if (!GetComponent <PlayerController>().isActiveAndEnabled) { enemy = true; playerControlled = false; } else { playerControlled = true; } } playerController = GetComponent <PlayerController>(); capCol = GetComponent <CapsuleCollider>(); rigidbody = GetComponent <Rigidbody>(); anim = GetComponent <Animator>(); ragMan = GetComponent <RagdollManager>(); wepMan = GetComponent <WeaponManager>(); arMan = GetComponent <ArmorManager>(); gamMan = GetComponent <GameManager>(); if (playerControlled && playerController.isEnabled) { camLook = GameObject.FindGameObjectWithTag("CameraHolder").GetComponent <FreeCameraLook>(); } }
// Use this for initialization void Start() { ControleGame.vida = health; //Setup our camera reference if (Camera.main != null) { cam = Camera.main.transform; } //and our Character Movement character = GetComponent <CharMove> (); //and our animator anim = GetComponent <Animator>(); //and our weapon manager weaponManager = GetComponent <WeaponManager>(); //and the collider //And setup the reference to the FreeCameraLook, //but since we already have store the camera, //we can navigate to the root transform to get the component from there instead of searching for it cameraFunctions = Camera.main.transform.root.GetComponent <FreeCameraLook>(); //Store the offset of the crosshair //offsetCross = cameraFunctions.crosshairOffsetWiggle; }
private void Start() { // get the transform of the main camera if (Camera.main != null) { m_Cam = Camera.main.transform; } else { Debug.LogWarning( "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls."); // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them! } // get the third person character ( this should never be null due to require component ) m_Character = GetComponentInChildren <HumanCharacter>(); m_CharacterAim = GetComponent <HumanMovement>(); //col = GetComponent<CapsuleCollider>(); //startHeight = col.height; m_RigidBody = GetComponent <Rigidbody>(); anim = GetComponentInChildren <Animator>(); charStats = GetComponent <CharacterStats>(); weaponManager = GetComponent <WeaponManager>(); cameraFunctions = Camera.main.gameObject.GetComponentInParent <FreeCameraLook>(); offsetCross = cameraFunctions.crosshairOffsetWiggle; //m_RigidBody.AddForce(1, 1, 1); //m_Character.Move(m_Move, crouch, m_Jump, false, lookPos); }
protected override void Awake() { instance = this; base.Awake(); cam = GetComponentInChildren <Camera>().transform; pivot = cam.parent.parent; //take the correct pivot }
void Awake() { // GameMasterObject.strongman = this.gameObject; myTransform = transform; if (GameMasterObject.dCamO != null) { cameraGO = GameMasterObject.dCamO; myTransform.position = DRespawnPos.myTransform.position + new Vector3(0f, 1f, 0f); freeCamLook = cameraGO.GetComponent <FreeCameraLook>(); if (freeCamLook != null) { burst = freeCamLook.burst2; } } }
void Start() { if (Camera.main != null) { cam = Camera.main.transform; } if (GameMasterObject.isMultiplayer) { GameMasterObject.strongmanNetwork = this.gameObject; GameMasterObject.dannyActive = false; GameMasterObject.strongmanActive = true; GameMasterObject.getStrongmanInfo = true; } rigidBody = GetComponent <Rigidbody> (); playerHealth = GetComponent <PlayerHealth1> (); charMove = GetComponent <StrongManMovement> (); anim = GetComponent <Animator>(); freeCamLook = cameraGO.GetComponent <FreeCameraLook>(); // sound = GetComponent<AudioSource> (); jumpRC = GetComponent <StrongManJumpingRaycast>(); shootCounter = 10; wZC = cameraGO.GetComponentInChildren <StrongManWeaponCameraZoom>(); turnSensitivity = GameMasterObject.turnSpeedNumber; fsScript = finalStrike.GetComponent <FinalStrikeForce> (); if (GameMasterObject.isMultiplayer) { rockThrowPic = EquipRock.rockPic; platformPic = EquipPlat.platPic; ragePic = EquipRage.ragePic; nothingUsing = EquipCant1.cantImage; } rockThrowPic.color = notEquipedColor; platformPic.color = goColor; ragePic.color = notEquipedColor; nothingUsing.color = notEquipedColor; targetingSpawnPoint = BulletSpawnSpot.myTransform; }
void DisableComponents() { if (enemy) { transform.GetComponent <NavMeshAgent>().enabled = false; transform.GetComponent <CapsuleCollider>().enabled = false; transform.GetComponent <Animator>().enabled = false; wepMan.DropWeapon(); transform.GetComponent <WeaponManager>().enabled = false; } else { transform.GetComponent <CapsuleCollider>().enabled = false; transform.GetComponent <PlayerController>().enabled = false; transform.GetComponent <Animator>().enabled = false; wepMan.DropWeapon(); transform.GetComponent <WeaponManager>().enabled = false; FreeCameraLook cameraHolder = GameObject.FindGameObjectWithTag("CameraHolder").GetComponent <FreeCameraLook>(); cameraHolder.enabled = false; } }
void Start () { if (Camera.main != null) { cam = Camera.main.transform; } character = GetComponent<CharMove> (); anim = GetComponent<Animator> (); weaponManager = GetComponent<WeaponManager> (); col = GetComponent<CapsuleCollider> (); startHeight = col.height; cameraFunctions = Camera.main.GetComponentInParent<FreeCameraLook> (); offsetCross = cameraFunctions.crosshairOffsetWiggle; }
void Start() { if (Camera.main != null) { cam = Camera.main.transform; } if (GameMasterObject.isMultiplayer) { GameMasterObject.dannyNetwork = this.gameObject; GameMasterObject.getDannyInfo = true; PauseManager.getDannyInfo = true; GameMasterObject.dannyActive = true; GameMasterObject.strongmanActive = false; } spawnAllyBlock = cam.GetComponent <BlockAllySpawn> (); playerHealth = GetComponent <PlayerHealth1> (); charMove = GetComponent <DannyMovement> (); anim = GetComponent <Animator>(); freeCamLook = cameraGO.GetComponent <FreeCameraLook>(); // dannyWeapon = GetComponent<DannyWeaponScript>(); jumpRC = GetComponent <JumpingRaycastDown>(); shootCounter = 10; // if(lift != null) // { // anim2 = lift.GetComponent<Animator>(); // liftScript = lift.GetComponent<LiftScript> (); // } wZC = cameraGO.GetComponentInChildren <WeaponCameraZoom>(); turnSensitivity = GameMasterObject.turnSpeedNumber; if (bowStaffObject != null) { bowAttack = bowStaffObject.GetComponent <PlayerBowStaff>(); } if (blazeSwordObject != null) { blazeAttack = blazeSwordObject.GetComponent <PlayerBowStaff>(); } }
private void Start() { // get the transform of the main camera if (Camera.main != null) { m_Cam = Camera.main.transform; } else { Debug.LogWarning( "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls."); // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them! } // get the third person character ( this should never be null due to require component ) m_Character = GetComponent <HumanCharacter>(); m_CharacterAim = GetComponent <New_Movement>(); col = GetComponent <CapsuleCollider>(); startHeight = col.height; anim = GetComponent <Animator>(); weaponManager = GetComponent <WeaponManager>(); cameraFunctions = Camera.main.transform.root.GetComponent <FreeCameraLook>(); offsetCross = cameraFunctions.crosshairOffsetWiggle; }
public void GetStrongmanInfo() { strongmanCameraOff = strongmanNetworkCamobj.GetComponent <FreeCameraLook> (); }
public void GetDannyCamInfo() { dannyShutCameraOff = dannyNetworkCamobj.GetComponent <FreeCameraLook>(); }
private void Start() { // get the transform of the main camera if (Camera.main != null) { m_Cam = Camera.main.transform; } else { Debug.LogWarning( "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls."); // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them! } // get the third person character ( this should never be null due to require component ) m_Character = GetComponentInChildren<HumanCharacter>(); m_CharacterAim = GetComponent<HumanMovement>(); //col = GetComponent<CapsuleCollider>(); //startHeight = col.height; m_RigidBody = GetComponent<Rigidbody>(); anim = GetComponentInChildren<Animator>(); charStats = GetComponent<CharacterStats>(); weaponManager = GetComponent<WeaponManager>(); cameraFunctions = Camera.main.gameObject.GetComponentInParent<FreeCameraLook>(); offsetCross = cameraFunctions.crosshairOffsetWiggle; //m_RigidBody.AddForce(1, 1, 1); //m_Character.Move(m_Move, crouch, m_Jump, false, lookPos); }
private void Start() { // get the transform of the main camera if (Camera.main != null) { m_Cam = Camera.main.transform; } else { Debug.LogWarning( "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls."); // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them! } // get the third person character ( this should never be null due to require component ) m_Character = GetComponent<HumanCharacter>(); m_CharacterAim = GetComponent<New_Movement>(); col = GetComponent<CapsuleCollider>(); startHeight = col.height; anim = GetComponent<Animator>(); weaponManager = GetComponent<WeaponManager>(); cameraFunctions = Camera.main.transform.root.GetComponent<FreeCameraLook>(); offsetCross = cameraFunctions.crosshairOffsetWiggle; }