// Use this for initialization void Start() { m_animator = GetComponent <Animator>(); m_body2d = GetComponent <Rigidbody2D>(); m_audioSource = GetComponent <AudioSource>(); m_audioManager = AudioManager_PrototypeHero.instance; m_groundSensor = transform.Find("GroundSensor").GetComponent <Sensor_Prototype>(); }
private void Awake() { if (instance != null) { Debug.LogError("More than one AudioManger in scene"); } else { instance = this; } }
// Use this for initialization que pasa WApo void Start() { m_animator = GetComponent <Animator>(); m_body2d = GetComponent <Rigidbody2D>(); m_audioSource = GetComponent <AudioSource>(); m_audioManager = AudioManager_PrototypeHero.instance; //Crouching get values of collider colSizeY = this.GetComponent <BoxCollider2D>().size.y; colOffsetY = this.GetComponent <BoxCollider2D>().offset.y; }
// Start is called before the first frame update void Start() { m_player = GetComponentInParent <PrototypeHero>(); m_audioManager = AudioManager_PrototypeHero.instance; }