Exemplo n.º 1
0
    void AddObject()
    {
        PointTextUI textPointObject = Instantiate(_textUIPoint);

        textPointObject.InitObject();
        textPointObject.gameObject.SetActive(false);
        textUIPool.Enqueue(textPointObject);
    }
Exemplo n.º 2
0
    public void GetObject(Vector3 playerPosition, string textMsg)
    {
        //Debug.Log("GetObject");
        if (textUIPool.Count == 0)
        {
            AddObject();
        }
        PointTextUI textPointObject = textUIPool.Dequeue();


        textPointObject.SetObjectStartPosition(playerPosition);
        textPointObject.SetObjectText(textMsg);
        textPointObject.gameObject.SetActive(true);
        textPointObject.StartObjectAnimation();
    }
Exemplo n.º 3
0
 public void BackToPool(PointTextUI textPoint)
 {
     //Debug.Log("Back To pool");
     textPoint.gameObject.SetActive(false);
     textUIPool.Enqueue(textPoint);
 }