Ejemplo n.º 1
0
        public GameObject IntantiateAttack(Vector3 position, Vector2Int[] range)
        {
            GameObject insta  = Instantiate(attack, position, Quaternion.identity);
            Glyphe     glyphe = insta.GetComponent <Glyphe>();

            if (glyphe == null)
            {
                Debug.LogError("No glyphe script : " + insta.name); return(insta);
            }
            glyphe.range = range;
            return(insta);
        }
Ejemplo n.º 2
0
        private bool ResolveAttacks()
        {
            if (attackParent.childCount <= 0)
            {
                return(true);
            }

            Glyphe glyphe = attackParent.GetChild(0).GetComponent <Glyphe>();

            if (glyphe != null)
            {
                if (!glyphe.IsResolving)
                {
                    glyphe.Resolve();
                }
            }
            else
            {
                Debug.LogError("Wtf bro ?");
            }

            return(false);
        }