예제 #1
0
파일: AttackObject.cs 프로젝트: Wizerdy/NGT
        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);
        }
예제 #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);
        }