Beispiel #1
0
    /// <summary>
    /// Set references
    /// </summary>
    private void Awake()
    {
        m_laser    = GetComponent <LaserBeamShooter>();
        m_animator = GetComponentInChildren <Animator>();

        // By using the inverse of the transform's up we ensure the laser comes out from the barrel
        // regardless of orientation
        m_directions[0] = -transform.up;
    }
Beispiel #2
0
 /// <summary>
 /// Sets the reference to the laser
 /// </summary>
 protected override void Awake()
 {
     base.Awake();
     m_laser = GetComponent <LaserBeamShooter>();
 }