예제 #1
0
        private static void loadSifNvcs(Game.SifResource sif)
        {
            foreach (string nvcFile in sif.Actions)
            {
                try
                {
                    // just because an NVC is loaded doesn't automatically mean we should load and use it!
                    int underscore = nvcFile.IndexOf("_");
                    if (underscore >= 0)
                    {
                        int all = nvcFile.IndexOf("all", StringComparison.OrdinalIgnoreCase);
                        if (all != underscore + 1) // check for day limitations
                        {
                            // I think looking for underscore should be enough to determine which NVCs we need
                            // to examine closer... maybe...
                            int currentDay = GameManager.CurrentDay;
                            if (nvcFile.Substring(underscore + 1).Contains(currentDay.ToString()) == false)
                            {
                                continue;
                            }
                        }
                    }

                    NvcResource nvc = _sceneContentManager.Load <NvcResource>(nvcFile);
                    NvcManager.AddNvc(nvc, false);
                }
                catch (System.IO.FileNotFoundException)
                {
                    // do nothing, sometimes NVCs just don't exist
                }
            }
        }
예제 #2
0
 private static void loadGlobalNvc(Resource.ResourceManager content)
 {
     NvcManager.AddNvc(content.Load <NvcResource>("GLB_ALL.NVC"), true);
 }