// 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>(); }
// Use this for initialization void Start() { m_animator = GetComponentInChildren <Animator>(); m_body2d = GetComponent <Rigidbody2D>(); m_SR = GetComponentInChildren <SpriteRenderer>(); m_gravity = m_body2d.gravityScale; m_groundSensor = transform.Find("GroundSensor").GetComponent <Sensor_Prototype>(); m_wallSensorR1 = transform.Find("WallSensor_R1").GetComponent <Sensor_Prototype>(); m_wallSensorR2 = transform.Find("WallSensor_R2").GetComponent <Sensor_Prototype>(); m_wallSensorL1 = transform.Find("WallSensor_L1").GetComponent <Sensor_Prototype>(); m_wallSensorL2 = transform.Find("WallSensor_L2").GetComponent <Sensor_Prototype>(); }