Example #1
0
    public void Release()
    {
        Time.timeScale = 1f;
        this.Bullet.Release();
        this.PlayerBullet.Release();
        this.Effect.Release();
        this.Form.Release();
        this.GoodsCreate.Release();
        if (this._Path != null)
        {
            this._Path.DeInit();
        }
        this.Game.Release();
        this.EntityCache.Release();
        this.Entity.DeInit();
        this.Mode.DeInit();
        this.MapEffect.Release();
        LocalModelManager.Instance.Drop_Drop.ClearGoldDrop();
        CInstance <TipsManager> .Instance.Clear();

        Updater.GetUpdater().OnRelease();
        Updater.UpdaterDeinit();
        Goods1151.DoorData.DeInit();
        Object.DestroyImmediate(GameNode.m_Battle);
        GameNode.MapCacheNode.DestroyChildren();
        GameLogic.Hold.Sound.DeInit();
        if (this._MapCreator != null)
        {
            this._MapCreator.Deinit();
        }
        if (this._Entity != null)
        {
            Object.DestroyImmediate(this._Entity.gameObject);
            this._Entity = null;
        }
        TimerBase <Timer> .Unregister();

        TimeClock.Clear();
        GameNode.m_HP.DestroyChildren();
        this._Game         = null;
        this._Bullet       = null;
        this._PlayerBullet = null;
        this._Effect       = null;
        this._MapEffect    = null;
        this._EntityCache  = null;
        this._MapCreator   = null;
        this._Path         = null;
        this._GoodsCreate  = null;
        this._Mode         = null;
        this._Form         = null;
        Goods1151.DoorData = null;
        GC.Collect();
    }
Example #2
0
    public static string[] ForType(Type clrType, EntityCacheManager cache)
    {
        // Get the default mapping from the static nested 'Mappings' class
        Type mappingsContainer = clrType.GetNestedType("Mappings");
        var  defaultMapping    = (IMapping)mappingsContainer.GetField("Default", BindingFlags.Static).GetValue(null);

        if (defaultMapping == null)
        {
            return(null);
        }

        var            metadata = new MappingMetaDataChannel();
        MappingContext context  = new MappingContext <object>(null, EdgeObjectsUtility.EntitySpace, metadata, cache);

        Recursive(defaultMapping, context);
        return(metadata._called.ToArray());
    }
Example #3
0
    public static void EdgeTypes_Get(SqlInt32 accountID, SqlInt32 channelID)
    {
        using (SqlConnection connection = new SqlConnection("context connection=true"))
        {
            // TODO: convert to eggplant query EdgeType.Queries.Get
            var command = new SqlCommand(@"
				select
					TypeID,
					ClrType,
					Name,
					IsAbstract,
					TableName,
					AccountID,
					ChannelID
				from
					EdgeType
				where
					AccountID in (-1, @accountID) and
					ChannelID in (-1, channelID)"
                                         , connection);

            var cache = new EntityCacheManager();

            using (SqlDataReader reader = command.ExecuteReader())
            {
                while (reader.Read())
                {
                    if (reader.Get <bool>("IsAbstract"))
                    {
                        continue;
                    }

                    // Get the actual type
                    Type     clrType = Type.GetType(reader.Get <string>("ClrType"));
                    string[] fields  = MappingMetaData.ForType(clrType, cache);

                    //SqlContext.Pipe.Send();
                }
            }
        }
    }