示例#1
0
        public static void Init(TaleEnvironmentType type)
        {
            if (_instance != null)
             {
            throw new InvalidOperationException("Cannot initialize an already created environment");
             }

             _taleType = type;
        }
示例#2
0
            public static TaleEnvironment Create(TaleEnvironmentType value)
            {
                switch (value)
                {
                   case TaleEnvironmentType.PATHFINDER:
                  return new PathfinderTaleEnvironment();

                   default:
                  throw new UnmanagedTaleEnvironmentTypeException(value);
                }
            }
 public UnmanagedTaleEnvironmentTypeException(TaleEnvironmentType value)
     : base(string.Format("Invalid tale type: {0}", value))
 {
     Value = value;
 }