void Awake() { m_player = GameObject.FindGameObjectWithTag("Player"); CurrentLevel = SceneManager.GetActiveScene().buildIndex; m_playerMovementScript = m_player.GetComponent <PlayerMovement_MarioFernandes>(); m_playerStealthScript = gameObject.GetComponent <PlayerStealth_JoaoBeijinho>(); m_passDialogue.Enable(); }
// Start is called before the first frame update void Start() { m_currentWeapon = new WeaponsTemplate_MarioFernandes[2]; m_playerStealthScript = FindObjectOfType <PlayerStealth_JoaoBeijinho>(); m_animationScript = GetComponent <PlayerAnimation_LouieWilliamson>(); m_playerHealthHungerScript = FindObjectOfType <PlayerHealthHunger_MarioFernandes>(); m_audioManager = FindObjectOfType <AudioManager_LouieWilliamson>(); Controller = GetComponent <PlayerController_JamieG>(); m_WeaponUI = GameObject.Find("WeaponsUI").GetComponent <WeaponUI_LouieWilliamson>(); m_effectManager = gameObject.GetComponent <EffectManager_MarioFernandes>(); }
/// <summary> /// detect player in vision cone the establishes line of sight /// </summary> /// <param name="collision"> the collion date from the onTrigger functions</param> protected void PlayerDetection(GameObject collision) { if (collision.CompareTag("Player")) // is it a the player { PlayerStealth_JoaoBeijinho playerStealth = collision.GetComponent <PlayerStealth_JoaoBeijinho>(); if (m_currentEnemyType == m_enemyType.PETTIGER) { if (!playerStealth.IsinVent()) { PlayerDetectionRaycasLogic(collision); } } else if (!playerStealth.IsStealthed()) //is the player in stealth/ { PlayerDetectionRaycasLogic(collision); } } }
private void Start() { m_pathfinder = GameObject.FindObjectOfType <Pathfinder_SebastianMol>(); m_scale = transform.localScale.x; m_lastPos = transform.position; m_startPos = transform.position; m_patrolIteratorMax = m_patrolPoints.Length - 1; m_patroleTimer = m_deleyBetweenPatrol; if (m_patrolPoints.Length > 0) { m_currentPatrolePos = m_patrolPoints[0]; } m_lookLeftAndRightTimerMax = m_lookLeftAndRightTimer; m_maxHealth = m_health; m_outOfSightTimer = m_outOfSightDeley; m_maxAttackRange = m_attackRange; m_inventory = GameObject.Find("Player").GetComponent <Inventory_JoaoBeijinho>(); m_playerStealthScript = FindObjectOfType <PlayerStealth_JoaoBeijinho>(); m_HitEffectElliott = GetComponent <HitEffectElliott>(); m_cameraShake = Camera.main.GetComponent <CameraShakeElliott>(); }
public void Awake() { m_playerControllerScript = FindObjectOfType <PlayerController_JamieG>(); m_playerStealthScript = FindObjectOfType <PlayerStealth_JoaoBeijinho>(); }