void Awake() { m_Rigidbody2D = GetComponent <Rigidbody2D>(); m_Bounds = GameObject.FindGameObjectWithTag("Bounds").GetComponent <ScreenBounds>(); m_Health = GetComponent <PlayerHealth>(); }
/// <summary> /// Initializes a new instance of the <see cref="MoveRight"/> class. /// </summary> /// <param name="bounds">Bounds.</param> public MoveRight(ScreenBounds bounds) { m_Bounds = bounds; }
/// <summary> /// Initializes a new instance of the <see cref="MoveLeft"/> class. /// </summary> /// <param name="bounds">Bounds.</param> public MoveLeft(ScreenBounds bounds) { m_Bounds = bounds; }
void Awake() { m_Bounds = GameObject.FindGameObjectWithTag("Bounds").GetComponent <ScreenBounds>(); }