//public bool detected = false; private void Awake() { GM = GetComponent <GameManager>(); checkpointsManager = GetComponent <CheckpointsManager>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>(); inputs = GameObject.FindGameObjectWithTag("Managers").GetComponent <ImputManager>(); camera = GameObject.FindGameObjectWithTag("TPCamera").GetComponent <CamaraAdjustment>(); playerAnims = player.GetComponentInChildren <PlayerAnimations>(); HUD = GetComponent <HudManager>(); weapon = player.GetComponentInChildren <WeaponManager>(); inv = GameObject.FindGameObjectWithTag("Inventory").GetComponentInChildren <Inventory>(); Items = player.GetComponentInChildren <Items>(); sound = GetComponent <SoundManager>(); peace = player.GetComponentInChildren <HealthPeace>(); CC = player.GetComponent <CloseCombat>(); //Hit = playerAnims.GetComponentInChildren<HitArea>(); itemDetector = Items.GetComponent <ItemDetector>(); throwImpact = player.GetComponentInChildren <ThrowImpact>(); stealth = player.GetComponent <StealthSystem>(); pauseMn = gameObject.GetComponent <PauseManager>(); IWM = player.GetComponentInChildren <ImprovedWeaponManager>(); Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; }
public void Initialize() { //transform.position = spawnPos; controler = GetComponent <CharacterController>(); GM = GameObject.FindGameObjectWithTag("Managers").GetComponent <GameManager>(); anims = GetComponentInChildren <PlayerAnimations>(); HUD = GameObject.FindGameObjectWithTag("Managers").GetComponent <HudManager>(); items = GetComponentInChildren <Items>(); WM = GetComponentInChildren <WeaponManager>(); CC = GetComponent <CloseCombat>(); life = GetComponentInChildren <HealthPeace>(); itemDetector = items.GetComponent <ItemDetector>(); stealth = GetComponentInChildren <StealthSystem>(); IWM = GetComponentInChildren <ImprovedWeaponManager>(); speed = walkSpeed; cam = Camera.main; camTrans = cam.transform; dodgeSpeed = dodgeNormalModeSpeed; timeOfDodge = timeOfDodgeNormalMode; timeForCanDodge = timeForCanDodgeNormalMode; normalHeight = controler.height; charControllercenterOffset = (normalHeight - crouchHeight) / 2; LoadPlayer(); }
public void Initialize() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>(); HUD = GameObject.FindGameObjectWithTag("Managers").GetComponent <HudManager>(); gm = GameObject.FindGameObjectWithTag("Managers").GetComponent <GameManager>(); WVisuals = GetComponent <WeaponsVisuals>(); stealth = player.stealth; items = player.GetComponentInChildren <Items>(); //audPlay = GetComponent<AudioPlayer>(); maxWeapons = weapons.Length; timeToSelect = inv.timeToVanish; }
// Start is called before the first frame update void Start() { int patrollersSize = aWSPatrols.Length; uint indexCount = 0; activeAgents = new NavMeshAgent[patrollersSize]; foundPlayer = new bool[patrollersSize]; foreach (var patroller in aWSPatrols) { activeAgents[indexCount] = patroller.GetAgent(); } stealthSystem = player.GetComponentInChildren <StealthSystem>(); }
void Start() { itsef = gameObject.GetComponent <EnemyTest>(); currentLife = maxLife; agent = GetComponent <NavMeshAgent>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>(); gm = GameObject.FindGameObjectWithTag("Managers").GetComponent <GameManager>(); audPlay = GetComponentInChildren <AudioPlayer>(); stealth = player.GetComponentInChildren <StealthSystem>(); playerDetector = GetComponentInChildren <EnemyPlayerDetector>(); sight = GetComponentInChildren <EnemySight>(); attack = GetComponentInChildren <EnemyAttackArea>(); execution = GetComponentInChildren <ExecutionArea>(); rigid = GetComponent <Rigidbody>(); anim = GetComponent <EnemyAnimations>(); anim.Initialize(); playerDetector.Initialize(); sight.Initialize(); execution.Initialize(); states = State.Stationary; StationarySet(); generalWaitOnPointTime = initGeneralWaitOnPointTime; waitOnPointTime = initWaitOnPointTime; waitComeFromSound = initWaitComeFromSound; percentageOfWait = initPercentageOfWait; }
private void Start() { stealth = GameObject.FindGameObjectWithTag("Player").GetComponent <StealthSystem>(); source = GetComponent <AudioSource>(); }