void Start() { tileOn = PlayerSoundsManager.Track.Grass; playerSoundManager = PlayerSoundsManager.Instance; renderer = GetComponent <SpriteRenderer>(); UpdateHealthBar(); }
private void Start() { player = GameObject.FindGameObjectWithTag("Player"); playerController = player.GetComponent <PlayerController>(); playerSoundsManager = player.GetComponent <PlayerSoundsManager>(); cController = GetComponent <CharacterController>(); anim = GetComponent <Animator>(); isUnlocked = GameManager.instance.data.LoadUnlockedMount(); }
// Use this for initialization void Start() { // fireBool = Animator.StringToHash("Fire"); _shootable = true; _bulletSpeed = 70.0f; _spawnTime = 0.25f; _distance = 10; //behaviourManager.SubscribeBehaviour(this); _playerSoundsManager = this.GetComponent <PlayerSoundsManager>(); }
// Start is always called after any Awake functions. void Start() { // Set up the references. jumpBool = Animator.StringToHash("Jump"); groundedBool = Animator.StringToHash("Grounded"); behaviourManager.GetAnim.SetBool(groundedBool, true); // Subscribe and register this behaviour as the default behaviour. behaviourManager.SubscribeBehaviour(this); behaviourManager.RegisterDefaultBehaviour(this.behaviourCode); speedSeeker = runSpeed; //_finishedJump = false; _playerSoundsManager = this.GetComponent <PlayerSoundsManager>(); }
// Start is called before the first frame update void Start() { iniRotateMouseY = false; cController = GetComponent <CharacterController>(); stamina = GetComponent <Stamina>(); Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; iniRotationY = transform.rotation.eulerAngles.y; FPSCamera = cameras[0];//GetComponentInChildren<CinemachineVirtualCamera>(); cameras[0].m_Priority = 10; zoom = GetComponentInChildren <CinemachineFollowZoom>(); soundsManager = GetComponent <PlayerSoundsManager>(); pickobj = GetComponent <PickUpObjects>(); interactobj = GetComponent <InteractWithObjects>(); anim = GetComponent <Animator>(); GetActiveWeaponAndCrossHair(); }
// Use this for initialization void Start() { gameManager = FindObjectOfType <GameManager>(); if (gameManager == null) { Debug.LogError("A GameManger is missing"); } rigid = GetComponent <Rigidbody2D>(); if (rigid == null) { Debug.LogError("A Rigidbody 2D is missing"); } animatorController = GetComponent <Animator>(); if (animatorController == null) { Debug.LogError("A Animatore is missing"); } healthBarController = GetComponent <HealthBarController>(); if (healthBarController == null) { Debug.LogError("A health bar is missing"); } healthBarController.SetMaxHealth(health); keyController = GetComponent <KeyController>(); if (keyController == null) { Debug.LogError("A key controller is missing"); } playerSoundsManager = GetComponent <PlayerSoundsManager>(); infoPlayer = GameObject.FindObjectOfType <InfoPlayer>(); //the player position is set to the startLevel point rigid.position = GameObject.FindGameObjectWithTag("StartLevel").transform.position; }