Ejemplo n.º 1
0
            public void Remove()
            {
                foreach (var netid in entities)
                {
                    //IemUtils.DDLog("component found " + joint.name);
                    BaseEntity be = null;

                    try
                    {
                        be = IemUtils.FindBaseEntityByNetId(netid);
                        if (be != null)
                        {
                            if (be.net != null)
                            {
                                uint tempuint = be.net.ID;

                                be.Kill(BaseNetworkable.DestroyMode.None);

                                if (storedData.Objects.ContainsKey(tempuint))
                                {
                                    storedData.Objects.Remove(tempuint);
                                }
                            }
                            else
                            {
                                IemUtils.DDLog("be was null");
                            }
                        }
                        else
                        {
                            IemUtils.DDLog("be net was null");
                        }
                    }

                    catch (Exception e)
                    {
                        Console.WriteLine("{0} Exception caught. obj.netId", e);
                    }
                }
                SaveData();
            }