// Use this for initialization void Start () { //weaponCollider = transform.Find("Hip/Body/Hand_R").GetComponentInChildren<PolygonCollider2D>(); foreach(Transform child in transform.Find("Hip/Body/Hand_R")) { weapon = child; } stats = GetComponent<Stats>(); anim = GetComponent<Animator>(); MovementAI = GetComponent<OgreAI>(); AttackDelay = 3f; NextAttackTime = -1f; }
// Use this for initialization void Awake() { //anim = GetComponent<Animator>(); col = GetComponent<CircleCollider2D>(); ai = transform.parent.gameObject.GetComponent<OgreAI>(); }