Ejemplo n.º 1
0
        private void addInterface <T>(IDynamicObject dynamicObject)
        {
            var type = typeof(T);

            if (!gameStates.ContainsKey(type))
            {
                Debug.LogError("Can not find that type: " + type);
                return;
            }

            var inter = dynamicObject.GetInterface <T>();

            if (inter == null)
            {
                return;
            }

            gameStates[type].Add(inter as IGameState);
        }