Ejemplo n.º 1
0
    public void RegenWood()
    {
        for (int i = 0; i < m_ListOffset.Count; i++)
        {
            GameObject     respawnItem = PoolingManager.Instance.PopFromPool(m_Wood, transform.position + m_ListOffset[i], transform.rotation);
            IRespawnObject respawn     = respawnItem.GetComponent <IRespawnObject>();

            if (respawn != null)
            {
                respawn.RespawnNumber = m_ListInteractObject.Count;
                respawn.InitializeRespawn(this);

                m_ListInteractObject.Add(respawn);
            }
            else
            {
                Common.LogError("Not have a respawn Item " + respawnItem.name);
            }
        }
    }
Ejemplo n.º 2
0
 public void RemoveWood(IRespawnObject obj)
 {
     if (m_ListInteractObject.Remove(obj))
     {
     }
 }