protected override void StartChild()
 {
     m_body = GetComponent <Rigidbody2D>();
     detector.AttachCallback(this);
     m_flipDelay = lookTime;
     m_animator.SetInteger("AnimState", 1);
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     m_body     = GetComponent <Rigidbody2D>();
     m_animator = GetComponent <Animator>();
     if (m_detector != null)
     {
         m_detector.AttachCallback(this);
     }
     state        = State.IDLE;
     m_checkDelay = checkDelay;
     m_health     = health;
 }