Exemplo n.º 1
0
 public override void Destory()
 {
     //clear npc
     if (m_Npc != null)
     {
         m_Npc.Distructor();
     }
     if (null != m_CreatedNpcObject)
     {
         GameObject.Destroy(m_CreatedNpcObject);
     }
 }
Exemplo n.º 2
0
    public void DestroyNpcById(int id)
    {
        Npc instance = null;

        if (m_NpcMap.TryGetValue(id, out instance))
        {
            instance.Distructor();
            m_NpcMap.Remove(id);
        }
        else
        {
            Debuger.LogWarning("can't find npc by id" + id);
        }
    }