void OnTriggerEnter(Collider coll)
        {
            /*DamageCollider dm = coll.GetComponent<DamageCollider> ();
             * if (dm == null)
             *      return;*/

            if (states)
            {
                EnemyStates e_st = coll.transform.GetComponentInParent <EnemyStates> ();

                if (e_st == null)
                {
                    return;
                }

                e_st.CheckForParry(transform.root, states);
            }

            if (enStates)
            {
                StateManager st = coll.transform.GetComponentInParent <StateManager> ();

                if (st == null)
                {
                    return;
                }
            }
        }
Beispiel #2
0
        void OnTriggerEnter(Collider other)
        {
//			DamageCollider dc = other.GetComponent<DamageCollider> ();
//			if (dc == null)
//				return;

            if (states)
            {
                EnemyStates e_st = other.transform.GetComponentInParent <EnemyStates> ();

                if (e_st != null)
                {
                    e_st.CheckForParry(transform.root, states);
                }
            }

            if (eStates)
            {
                //check for player
            }
        }
Beispiel #3
0
        public void OnTriggerEnter(Collider other)
        {
            if (states)
            {
                EnemyStates e_st = other.transform.GetComponentInParent <EnemyStates>();

                if (e_st == null)
                {
                    e_st.CheckForParry(transform.root, states);
                }
            }


            if (Bstates)
            {
                BossStates st = other.transform.GetComponent <BossStates>();
                if (st == null)
                {
                    Debug.Log("Parry");
                    st.CheckForParry(transform.root, states);
                }
            }
        }