Esempio n. 1
0
    public void ObjectRemove(S.ObjectRemove p)
    {
        if (ObjectList.TryGetValue(p.ObjectID, out MapObject ob))
        {
            if (ob is ItemObject)
            {
                ObjectList.Remove(p.ObjectID);
                Destroy(ob.gameObject);
            }

            else if (ob is MonsterObject monster)
            {
                switch (monster.Class)
                {
                case MonsterClass.Boss:
                    GameScene.BossUi.SetActive(false);
                    ob.gameObject.SetActive(false);
                    CurrentScene.Cells[ob.CurrentLocation.x, ob.CurrentLocation.y].RemoveObject(ob);
                    return;
                }
            }
            else
            {
                ob.gameObject.SetActive(false);
            }
            CurrentScene.Cells[ob.CurrentLocation.x, ob.CurrentLocation.y].RemoveObject(ob);
        }
    }
Esempio n. 2
0
 public void ObjectRemove(S.ObjectRemove p)
 {
     if (ObjectList.TryGetValue(p.ObjectID, out MapObject ob))
     {
         if (ob is ItemObject)
         {
             ObjectList.Remove(p.ObjectID);
             Destroy(ob.gameObject);
         }
         else
         {
             ob.gameObject.SetActive(false);
         }
         CurrentScene.Cells[(int)ob.CurrentLocation.x, (int)ob.CurrentLocation.y].RemoveObject(ob);
     }
 }
Esempio n. 3
0
        private void ObjectRemove(S.ObjectRemove p)
        {
            if (p.ObjectID == User.ObjectID)
            {
                return;
            }

            for (int i = MapControl.Objects.Count - 1; i >= 0; i--)
            {
                MapObject ob = MapControl.Objects[i];
                if (ob.ObjectID != p.ObjectID)
                {
                    continue;
                }
                ob.Remove();
            }
        }
Esempio n. 4
0
 public static void ObjectRemove(S.ObjectRemove p)
 {
     gameManager.ObjectRemove(p);
 }