Exemplo n.º 1
0
        public void AddListener()
        {
            RemoveListener();

            GameEntity publisher = m_Context.GetEntityWithId(m_PublisherId);

            if (publisher == null)
            {
                publisher     = m_Context.CreateEntity();
                m_PublisherId = publisher.id.value;
            }

            publisher.AddBeforeDestroyListener(this);
        }