PoolChild AddChild()
    {
        GameObject child     = Instantiate(childPrefab, transform);
        PoolChild  poolChild = child.GetComponent <PoolChild> ();

        children.Add(poolChild);
        return(poolChild);
    }
示例#2
0
    //  ObjectPool objectPool;

    void Awake()
    {
        child = GetComponent <PoolChild>();
        //tag = diceStatus.diceName;
        sprite = GetComponent <SpriteRenderer>();
        name   = nameof(Dice);
        eyes   = new List <DiceEye>();
    }
示例#3
0
    void Awake()
    {
        child     = GetComponent <PoolChild>();
        text      = GetComponent <TextMeshPro>();
        text.text = "";

        alpha = text.color;
    }
示例#4
0
 void Start()
 {
     master = GameObject.Find(BoardType.UserBoard.ToString()).GetComponent <GameMaster>();
     child  = GetComponent <PoolChild>();
     if (!damageIndcatorsKey.Equals(""))
     {
         damageIndecator = ObjectPoolManager.GetInstance().Get(damageIndcatorsKey);
     }
 }
示例#5
0
 public void TurnChild(PoolChild child)
 {
     child.gameObject.SetActive(false);
     child.transform.SetParent(objectPools.transform);
     if (!deActiveObjects.Contains(child.gameObject))
     {
         deActiveObjects.Enqueue(child.gameObject);
         activeObjects.Remove(child.gameObject);
     }
 }
示例#6
0
    /// <summary>
    /// 적 스텟 범위
    /// </summary>



    public void Start()
    {
        child        = GetComponent <PoolChild>();
        destinations = new Queue <Vector3>();
        destinations.Enqueue(board.SecondVertex());
        destinations.Enqueue(board.ThirdVertex());
        destinations.Enqueue(board.FourthVertex());
        StageManager.GetInstance().Join(this);
        enemyHp    = new Vector2(60, 200);
        enemySpeed = new Vector2(3f, 5f);
        enemyCache = EnemyCache.GetInstance();
        StartCoroutine(SpwanMonster());
    }
示例#7
0
    private void Instantiates()
    {
        // 풀링 개수만큼 생성
        for (int i = 0; i < max; i++)
        {
            GameObject obj       = Instantiate(prefab.gameObject, objectPools.transform);
            PoolChild  poolChild = obj.GetComponent <PoolChild>();
            poolChild.SetObjectPool(this);

            obj.name = prefab.name + i.ToString("00");
            obj.SetActive(false);
            deActiveObjects.Enqueue(obj);
        }
    }
示例#8
0
 public void Start()
 {
     poolChild = GetComponent <PoolChild>();
 }