public LightingManager(IGameContext gameContext, IGameProperties gameProperties, IMeshManager meshManager, IMaterialManager materialManager, ITextureManager textureManager, IRenderManager renderManager, CameraManager cameraManager, LightStore lightStore, ILightManager lightManager, TimeManager timeManager) { this.gameContext = gameContext; this.gameProperties = gameProperties; this.meshManager = meshManager; this.textureManager = textureManager; this.renderManager = renderManager; this.cameraManager = cameraManager; this.lightStore = lightStore; this.lightManager = lightManager; this.timeManager = timeManager; skySphereMesh = meshManager.CreateMesh(ObjParser.LoadObj("meshes/skysphere.obj").MeshData); skyMaterial = materialManager.CreateMaterial("data/skybox.json"); noiseTexture = textureManager.LoadTexture("textures/noise_512.png"); skyMaterial.SetTexture("cloudsTex", noiseTexture); }
/// <summary> /// Construct the trip view, passing in the persistent trip store. Sets up /// a command to handle invoking the Add button. /// </summary> /// <param name="store"></param> public LightListViewModel(LightStore store) { this.store = store; Lights = store.Lights; addLightCommand = new RelayCommand(new Action(AddLight)); }
/// <summary> /// Construct Trip ViewModel, providing the store to persist trips. /// Creates the RelayCommands to be bound to various buttons in the UI. /// </summary> /// <param name="store">The persistent store</param> public LightViewModel(LightStore store) { light = new Light(); saveLightsCommand = new RelayCommand(new Action(SaveLight)); deleteLightsCommand = new RelayCommand(new Action(DeleteLight)); this.store = store; }
public DbcManager(IGameContext gameContext, IDatabaseClientFileOpener opener) { this.gameContext = gameContext; this.opener = opener; AreaTriggerStore = new(OpenDbc("AreaTrigger")); CreatureDisplayInfoStore = new(OpenDbc("CreatureDisplayInfo")); // CreatureDisplayInfoExtraStore = new(OpenDbc("CreatureDisplayInfoExtra")); // for humanoids CreatureModelDataStore = new(OpenDbc("CreatureModelData")); MapStore = new (OpenDbc("Map")); LightIntParamStore = new (OpenDbc("LightIntBand")); LightFloatParamStore = new (OpenDbc("LightFloatBand")); LightParamStore = new (OpenDbc("LightParams"), LightIntParamStore, LightFloatParamStore); LightStore = new (OpenDbc("Light"), LightParamStore); }
/// <summary> /// Set up all of the known view models, and instantiate the trip repository. /// </summary> public ViewModelLocator() { LightStore store = new LightStore(); InitializeStore(store); modelSet.Add("LightListViewModel", new LightListViewModel(store)); modelSet.Add("LightViewModel", new LightViewModel(store)); /* * TripStore store = new TripStore(); * InitializeStore(store); * modelSet.Add("TripListViewModel", new TripListViewModel(store)); * modelSet.Add("TripViewModel", new TripViewModel(store)); */ }
public DbcManager(IGameFiles gameFiles, IDatabaseClientFileOpener opener) { this.gameFiles = gameFiles; this.opener = opener; AreaTableStore = new(OpenDbc("AreaTable")); AreaTriggerStore = new(OpenDbc("AreaTrigger")); CreatureDisplayInfoStore = new(OpenDbc("CreatureDisplayInfo")); CreatureDisplayInfoExtraStore = new(OpenDbc("CreatureDisplayInfoExtra")); // for humanoids CreatureModelDataStore = new(OpenDbc("CreatureModelData")); GameObjectDisplayInfoStore = new(OpenDbc("GameObjectDisplayInfo")); ItemDisplayInfoStore = new(OpenDbc("ItemDisplayInfo")); CharSectionsStore = new(OpenDbc("CharSections")); // ChrRacesStore = new(OpenDbc("ChrRaces")); CharacterFacialHairStylesStore = new(OpenDbc("CharacterFacialHairStyles")); CharHairGeosetsStore = new(OpenDbc("CharHairGeosets")); MapStore = new (OpenDbc("Map")); LightIntParamStore = new (OpenDbc("LightIntBand")); LightFloatParamStore = new (OpenDbc("LightFloatBand")); LightParamStore = new (OpenDbc("LightParams"), LightIntParamStore, LightFloatParamStore); LightStore = new (OpenDbc("Light"), LightParamStore); }
private async void InitializeStore(LightStore store) { // await store.LoadTrips(); await store.LoadLights(); }