Exemple #1
0
        public TriggerDatabaseBuilderSerializer(Engine.PhxEngine phx)
        {
            Contract.Requires(phx != null);

            mDatabase = phx.Database;
            TriggerDb = phx.TriggerDb;
        }
Exemple #2
0
        public BTriggerScriptSerializer(Engine.PhxEngine phx, Phx.BScenario scnr = null)
        {
            Contract.Requires(phx != null);

            mDatabase = phx.Database;
            TriggerDb = phx.TriggerDb;
            Scenario  = scnr;
        }
Exemple #3
0
        void ParsePowers(Engine.PhxEngine e)
        {
            System.Threading.Tasks.ParallelLoopResult result;

            ReadDataFilesAsync(Engine.ContentStorage.Game, Engine.GameDirectory.PowerScripts,
                               Phx.BTriggerSystem.GetFileExtSearchPattern(Phx.BTriggerScriptType.Power),
                               ParseTriggerScript, out result);
        }
Exemple #4
0
        void ParseScenarios(Engine.PhxEngine e)
        {
            System.Threading.Tasks.ParallelLoopResult result;

            ReadDataFilesAsync(Engine.ContentStorage.Game, Engine.GameDirectory.Scenario,
                               "*.scn",
                               ParseScenarioScripts, out result);
        }
Exemple #5
0
        protected BDatabaseBase(Engine.PhxEngine engine, Collections.IProtoEnum gameObjectTypes)
        {
            Engine = engine;

            ObjectDatabase = new ProtoDataObjectDatabase(this, typeof(DatabaseObjectKind));

            ObjectTypes = new Collections.BTypeNamesWithCode(gameObjectTypes);

            InitializeDatabaseInterfaces();
        }
        public ProtoDataObjectDatabase GetObjectDatabase(Engine.PhxEngine engine)
        {
            switch (SourceKind)
            {
            case ProtoDataObjectSourceKind.Database:
                return(new ProtoDataObjectDatabase(engine.Database, typeof(DatabaseObjectKind)));

            case ProtoDataObjectSourceKind.GameData:
                return(new ProtoDataObjectDatabase(engine.Database.GameData, typeof(GameDataObjectKind)));

            case ProtoDataObjectSourceKind.HPData:
                return(new ProtoDataObjectDatabase(engine.Database.HPBars, typeof(HPBarDataObjectKind)));

            default:
                throw new System.NotImplementedException(string.Format(
                                                             nameof(GetObjectDatabase) + " needs support for {0}",
                                                             this));
            }
        }
 public BDatabase(Engine.PhxEngine engine) : base(engine, kGameObjectTypes)
 {
     RepairPowerID = RallyPointPowerID = HookRepairPowerID = UnscOdstDropPowerID =
         TypeExtensions.kNone;
 }