├── .gitignore
├── Assets
├── Materials.meta
├── Materials
│ ├── Sky.mat
│ ├── Sky.mat.meta
│ ├── Underwater_Reversed.mat
│ └── Underwater_Reversed.mat.meta
├── Plugins.meta
├── Plugins
│ ├── MP3Sharp.dll
│ └── MP3Sharp.dll.meta
├── Prefabs.meta
├── Prefabs
│ ├── Player.prefab
│ ├── Player.prefab.meta
│ ├── Spectator.prefab
│ ├── Spectator.prefab.meta
│ ├── TESUnity.prefab
│ ├── TESUnity.prefab.meta
│ ├── Water.prefab
│ └── Water.prefab.meta
├── Resources.meta
├── Resources
│ ├── Materials.meta
│ ├── Materials
│ │ ├── BumpedDiffuse.mat
│ │ ├── BumpedDiffuse.mat.meta
│ │ ├── BumpedDiffuseTransCutout.mat
│ │ ├── BumpedDiffuseTransCutout.mat.meta
│ │ ├── Standard.mat
│ │ ├── Standard.mat.meta
│ │ ├── StandardCutout.mat
│ │ ├── StandardCutout.mat.meta
│ │ ├── TESUnityAlphaBlend.mat
│ │ ├── TESUnityAlphaBlend.mat.meta
│ │ ├── TESUnityStandard.mat
│ │ ├── TESUnityStandard.mat.meta
│ │ ├── TESUnityTested.mat
│ │ ├── TESUnityTested.mat.meta
│ │ ├── Unlit.mat
│ │ ├── Unlit.mat.meta
│ │ ├── UnlitTransparentCutout.mat
│ │ └── UnlitTransparentCutout.mat.meta
│ ├── UI.meta
│ └── UI
│ │ ├── Book.prefab
│ │ ├── Book.prefab.meta
│ │ ├── InteractiveText.prefab
│ │ ├── InteractiveText.prefab.meta
│ │ ├── Scroll.prefab
│ │ └── Scroll.prefab.meta
├── Scenes.meta
├── Scenes
│ ├── AskPathScene.unity
│ ├── AskPathScene.unity.meta
│ ├── GameScene.unity
│ └── GameScene.unity.meta
├── Scripts.meta
├── Scripts
│ ├── Core.meta
│ ├── Core
│ │ ├── ArrayRange.cs
│ │ ├── ArrayRange.cs.meta
│ │ ├── ArrayUtils.cs
│ │ ├── ArrayUtils.cs.meta
│ │ ├── AudioUtils.cs
│ │ ├── AudioUtils.cs.meta
│ │ ├── ColorUtils.cs
│ │ ├── ColorUtils.cs.meta
│ │ ├── DDSReader.cs
│ │ ├── DDSReader.cs.meta
│ │ ├── Exceptions.cs
│ │ ├── Exceptions.cs.meta
│ │ ├── FlyingCameraComponent.cs
│ │ ├── FlyingCameraComponent.cs.meta
│ │ ├── GUIUtils.cs
│ │ ├── GUIUtils.cs.meta
│ │ ├── GameObjectUtils.cs
│ │ ├── GameObjectUtils.cs.meta
│ │ ├── MusicPlayer.cs
│ │ ├── MusicPlayer.cs.meta
│ │ ├── OneShotAudioStreamComponent.cs
│ │ ├── OneShotAudioStreamComponent.cs.meta
│ │ ├── StringUtils.cs
│ │ ├── StringUtils.cs.meta
│ │ ├── TemporalLoadBalancer.cs
│ │ ├── TemporalLoadBalancer.cs.meta
│ │ ├── Texture2DInfo.cs
│ │ ├── Texture2DInfo.cs.meta
│ │ ├── TextureUtils.cs
│ │ ├── TextureUtils.cs.meta
│ │ ├── UnityBinaryReader.cs
│ │ ├── UnityBinaryReader.cs.meta
│ │ ├── Utils.cs
│ │ ├── Utils.cs.meta
│ │ ├── Vector2i.cs
│ │ ├── Vector2i.cs.meta
│ │ ├── VirtualFileSystem.cs
│ │ └── VirtualFileSystem.cs.meta
│ ├── TES.meta
│ └── TES
│ │ ├── BSAFile.cs
│ │ ├── BSAFile.cs.meta
│ │ ├── CellManager.cs
│ │ ├── CellManager.cs.meta
│ │ ├── Components.meta
│ │ ├── Components
│ │ ├── PathSelectionComponent.cs
│ │ ├── PathSelectionComponent.cs.meta
│ │ ├── PlayerComponent.cs
│ │ ├── PlayerComponent.cs.meta
│ │ ├── PlayerInventory.cs
│ │ ├── PlayerInventory.cs.meta
│ │ ├── PostEffectManager.cs
│ │ ├── PostEffectManager.cs.meta
│ │ ├── Records.meta
│ │ ├── Records
│ │ │ ├── ActivatorComponent.cs
│ │ │ ├── ActivatorComponent.cs.meta
│ │ │ ├── AlchemyApparatusComponent.cs
│ │ │ ├── AlchemyApparatusComponent.cs.meta
│ │ │ ├── AlchemyComponent.cs
│ │ │ ├── AlchemyComponent.cs.meta
│ │ │ ├── ArmorComponent.cs
│ │ │ ├── ArmorComponent.cs.meta
│ │ │ ├── BookComponent.cs
│ │ │ ├── BookComponent.cs.meta
│ │ │ ├── ClothComponent.cs
│ │ │ ├── ClothComponent.cs.meta
│ │ │ ├── ContainerComponent.cs
│ │ │ ├── ContainerComponent.cs.meta
│ │ │ ├── CreatureComponent.cs
│ │ │ ├── CreatureComponent.cs.meta
│ │ │ ├── DoorComponent.cs
│ │ │ ├── DoorComponent.cs.meta
│ │ │ ├── GenericObjectComponent.cs
│ │ │ ├── GenericObjectComponent.cs.meta
│ │ │ ├── IngredientComponent.cs
│ │ │ ├── IngredientComponent.cs.meta
│ │ │ ├── LightComponent.cs
│ │ │ ├── LightComponent.cs.meta
│ │ │ ├── LockComponent.cs
│ │ │ ├── LockComponent.cs.meta
│ │ │ ├── MiscObjectComponent.cs
│ │ │ ├── MiscObjectComponent.cs.meta
│ │ │ ├── NPCComponent.cs
│ │ │ ├── NPCComponent.cs.meta
│ │ │ ├── ProbComponent.cs
│ │ │ ├── ProbComponent.cs.meta
│ │ │ ├── RepaireComponent.cs
│ │ │ ├── RepaireComponent.cs.meta
│ │ │ ├── WeaponComponent.cs
│ │ │ └── WeaponComponent.cs.meta
│ │ ├── VR.meta
│ │ └── VR
│ │ │ ├── OculusHand.cs
│ │ │ ├── OculusHand.cs.meta
│ │ │ ├── PlayerVRComponent.cs
│ │ │ ├── PlayerVRComponent.cs.meta
│ │ │ ├── VRGazeUI.cs
│ │ │ └── VRGazeUI.cs.meta
│ │ ├── Convert.cs
│ │ ├── Convert.cs.meta
│ │ ├── ESM.meta
│ │ ├── ESM
│ │ ├── ESMFile.cs
│ │ ├── ESMFile.cs.meta
│ │ ├── Records.cs
│ │ └── Records.cs.meta
│ │ ├── Effects.meta
│ │ ├── Effects
│ │ ├── LightAnim.cs
│ │ ├── LightAnim.cs.meta
│ │ ├── UnderwaterEffect.cs
│ │ └── UnderwaterEffect.cs.meta
│ │ ├── GameSettings.cs
│ │ ├── GameSettings.cs.meta
│ │ ├── MaterialManager.cs
│ │ ├── MaterialManager.cs.meta
│ │ ├── Materials.meta
│ │ ├── Materials
│ │ ├── MWBaseMaterial.cs
│ │ ├── MWBaseMaterial.cs.meta
│ │ ├── MWBumpedDiffuseMaterial.cs
│ │ ├── MWBumpedDiffuseMaterial.cs.meta
│ │ ├── MWDefaultMaterial.cs
│ │ ├── MWDefaultMaterial.cs.meta
│ │ ├── MWStandardMaterial.cs
│ │ ├── MWStandardMaterial.cs.meta
│ │ ├── MWUnlitMaterial.cs
│ │ └── MWUnlitMaterial.cs.meta
│ │ ├── MorrowindDataReader.cs
│ │ ├── MorrowindDataReader.cs.meta
│ │ ├── MorrowindEngine.cs
│ │ ├── MorrowindEngine.cs.meta
│ │ ├── NIF.meta
│ │ ├── NIF
│ │ ├── NIFManager.cs
│ │ ├── NIFManager.cs.meta
│ │ ├── NIFObjectBuilder.cs
│ │ ├── NIFObjectBuilder.cs.meta
│ │ ├── NIFParserGenerator.cs
│ │ ├── NIFParserGenerator.cs.meta
│ │ ├── NIFReader.cs
│ │ ├── NIFReader.cs.meta
│ │ ├── NIFUtils.cs
│ │ └── NIFUtils.cs.meta
│ │ ├── TESUnity.cs
│ │ ├── TESUnity.cs.meta
│ │ ├── TextureManager.cs
│ │ ├── TextureManager.cs.meta
│ │ ├── UI.meta
│ │ └── UI
│ │ ├── UIBook.cs
│ │ ├── UIBook.cs.meta
│ │ ├── UICrosshair.cs
│ │ ├── UICrosshair.cs.meta
│ │ ├── UIInteractiveText.cs
│ │ ├── UIInteractiveText.cs.meta
│ │ ├── UIManager.cs
│ │ ├── UIManager.cs.meta
│ │ ├── UIScroll.cs
│ │ └── UIScroll.cs.meta
├── Shaders.meta
├── Shaders
│ ├── MWCG.cginc
│ ├── MWCG.cginc.meta
│ ├── MW_Standard.shader
│ ├── MW_Standard.shader.meta
│ ├── MW_Standard_Blended.shader
│ ├── MW_Standard_Blended.shader.meta
│ ├── MW_Standard_Tested.shader
│ └── MW_Standard_Tested.shader.meta
├── Textures.meta
├── Textures
│ ├── AppBanner.png
│ ├── AppBanner.png.meta
│ ├── AppIcon.png
│ ├── AppIcon.png.meta
│ ├── Book_PlaceHolder.png
│ ├── Book_PlaceHolder.png.meta
│ ├── Scroll_Placeholder.png
│ ├── Scroll_Placeholder.png.meta
│ ├── TESFonts.meta
│ └── TESFonts
│ │ ├── Kingthings Exeter.ttf
│ │ ├── Kingthings Exeter.ttf.meta
│ │ ├── Kingthings Petrock light.ttf
│ │ ├── Kingthings Petrock light.ttf.meta
│ │ ├── Kingthings Petrock.ttf
│ │ ├── Kingthings Petrock.ttf.meta
│ │ ├── MorrisRomanBlack.ttf
│ │ ├── MorrisRomanBlack.ttf.meta
│ │ ├── MorrisRomanBlackAlt.ttf
│ │ ├── MorrisRomanBlackAlt.ttf.meta
│ │ ├── Planewalker.ttf
│ │ ├── Planewalker.ttf.meta
│ │ ├── Readme_TES_Fonts.txt
│ │ ├── Readme_TES_Fonts.txt.meta
│ │ ├── oblivion-font.ttf
│ │ └── oblivion-font.ttf.meta
├── Vendors.meta
└── Vendors
│ ├── .gitignore
│ ├── README.md
│ ├── README.md.meta
│ ├── Standard Assets.meta
│ └── Standard Assets
│ ├── Effects.meta
│ ├── Effects
│ ├── AmbientOcclusion.meta
│ ├── AmbientOcclusion
│ │ ├── AmbientOcclusion.cs
│ │ ├── AmbientOcclusion.cs.meta
│ │ ├── Editor.meta
│ │ ├── Editor
│ │ │ ├── AmbientOcclusionEditor.cs
│ │ │ └── AmbientOcclusionEditor.cs.meta
│ │ ├── Helpers.meta
│ │ ├── Helpers
│ │ │ ├── PropertyObserver.cs
│ │ │ ├── PropertyObserver.cs.meta
│ │ │ ├── Settings.cs
│ │ │ └── Settings.cs.meta
│ │ ├── Resources.meta
│ │ └── Resources
│ │ │ ├── AmbientOcclusion.cginc
│ │ │ ├── AmbientOcclusion.cginc.meta
│ │ │ ├── AmbientOcclusion.shader
│ │ │ └── AmbientOcclusion.shader.meta
│ ├── AntiAliasing.meta
│ ├── AntiAliasing
│ │ ├── AntiAliasing.cs
│ │ ├── AntiAliasing.cs.meta
│ │ ├── Editor.meta
│ │ ├── Editor
│ │ │ ├── AntiAliasingEditor.cs
│ │ │ ├── AntiAliasingEditor.cs.meta
│ │ │ ├── IAntiAliasingEditor.cs
│ │ │ └── IAntiAliasingEditor.cs.meta
│ │ ├── FXAA.meta
│ │ ├── FXAA
│ │ │ ├── Editor.meta
│ │ │ ├── Editor
│ │ │ │ ├── FXAAEditor.cs
│ │ │ │ └── FXAAEditor.cs.meta
│ │ │ ├── FXAA.cs
│ │ │ ├── FXAA.cs.meta
│ │ │ ├── Resources.meta
│ │ │ └── Resources
│ │ │ │ ├── FXAA.shader
│ │ │ │ ├── FXAA.shader.meta
│ │ │ │ ├── FXAA3.cginc
│ │ │ │ └── FXAA3.cginc.meta
│ │ ├── IAntiAliasing.cs
│ │ ├── IAntiAliasing.cs.meta
│ │ ├── SMAA.meta
│ │ └── SMAA
│ │ │ ├── Editor.meta
│ │ │ ├── Editor
│ │ │ ├── SMAAEditor.cs
│ │ │ └── SMAAEditor.cs.meta
│ │ │ ├── Resources.meta
│ │ │ ├── Resources
│ │ │ ├── AreaTex.tga
│ │ │ ├── AreaTex.tga.meta
│ │ │ ├── SMAA.cginc
│ │ │ ├── SMAA.cginc.meta
│ │ │ ├── SMAA.shader
│ │ │ ├── SMAA.shader.meta
│ │ │ ├── SearchTex.tga
│ │ │ └── SearchTex.tga.meta
│ │ │ ├── SMAA.cs
│ │ │ └── SMAA.cs.meta
│ ├── Bloom.meta
│ ├── Bloom
│ │ ├── Bloom.cs
│ │ ├── Bloom.cs.meta
│ │ ├── Editor.meta
│ │ ├── Editor
│ │ │ ├── BloomEditor.cs
│ │ │ ├── BloomEditor.cs.meta
│ │ │ ├── BloomGraphDrawer.cs
│ │ │ └── BloomGraphDrawer.cs.meta
│ │ ├── Resources.meta
│ │ └── Resources
│ │ │ ├── Bloom.cginc
│ │ │ ├── Bloom.cginc.meta
│ │ │ ├── Bloom.shader
│ │ │ └── Bloom.shader.meta
│ ├── Common.meta
│ └── Common
│ │ ├── Editor.meta
│ │ ├── Editor
│ │ ├── EditorGUIHelper.cs
│ │ ├── EditorGUIHelper.cs.meta
│ │ ├── FieldFinder.cs
│ │ ├── FieldFinder.cs.meta
│ │ ├── MinDrawer.cs
│ │ └── MinDrawer.cs.meta
│ │ ├── ImageEffectHelper.cs
│ │ ├── ImageEffectHelper.cs.meta
│ │ ├── MinAttribute.cs
│ │ ├── MinAttribute.cs.meta
│ │ ├── RenderTextureUtility.cs
│ │ └── RenderTextureUtility.cs.meta
│ ├── Environment.meta
│ └── Environment
│ ├── Water (Basic).meta
│ ├── Water (Basic)
│ ├── Materials.meta
│ ├── Materials
│ │ ├── WaterBasicDaytime.mat
│ │ ├── WaterBasicDaytime.mat.meta
│ │ ├── WaterBasicNighttime.mat
│ │ ├── WaterBasicNighttime.mat.meta
│ │ ├── WaterDefault.mat
│ │ └── WaterDefault.mat.meta
│ ├── Models.meta
│ ├── Models
│ │ ├── WaterBasicPlane.fbx
│ │ └── WaterBasicPlane.fbx.meta
│ ├── Prefabs.meta
│ ├── Prefabs
│ │ ├── WaterBasicDaytime.prefab
│ │ ├── WaterBasicDaytime.prefab.meta
│ │ ├── WaterBasicNightime.prefab
│ │ └── WaterBasicNightime.prefab.meta
│ ├── Scripts.meta
│ ├── Scripts
│ │ ├── WaterBasic.cs
│ │ └── WaterBasic.cs.meta
│ ├── Shaders.meta
│ ├── Shaders
│ │ ├── FXWaterBasic.shader
│ │ └── FXWaterBasic.shader.meta
│ ├── Textures.meta
│ └── Textures
│ │ ├── WaterBasicDaytimeGradient.psd
│ │ ├── WaterBasicDaytimeGradient.psd.meta
│ │ ├── WaterBasicNighttimeGradient.psd
│ │ ├── WaterBasicNighttimeGradient.psd.meta
│ │ ├── WaterBasicNormals.jpg
│ │ └── WaterBasicNormals.jpg.meta
│ ├── Water.meta
│ └── Water
│ ├── Water.meta
│ ├── Water
│ ├── Materials.meta
│ ├── Materials
│ │ ├── WaterPlaneMaterial.mat
│ │ ├── WaterPlaneMaterial.mat.meta
│ │ ├── WaterProDaytime.mat
│ │ ├── WaterProDaytime.mat.meta
│ │ ├── WaterProNighttime.mat
│ │ └── WaterProNighttime.mat.meta
│ ├── Models.meta
│ ├── Models
│ │ ├── WaterPlane.fbx
│ │ └── WaterPlane.fbx.meta
│ ├── Prefabs.meta
│ ├── Prefabs
│ │ ├── WaterProDaytime.prefab
│ │ ├── WaterProDaytime.prefab.meta
│ │ ├── WaterProNighttime.prefab
│ │ └── WaterProNighttime.prefab.meta
│ ├── Scripts.meta
│ ├── Scripts
│ │ ├── Displace.cs
│ │ ├── Displace.cs.meta
│ │ ├── GerstnerDisplace.cs
│ │ ├── GerstnerDisplace.cs.meta
│ │ ├── MeshContainer.cs
│ │ ├── MeshContainer.cs.meta
│ │ ├── PlanarReflection.cs
│ │ ├── PlanarReflection.cs.meta
│ │ ├── SpecularLighting.cs
│ │ ├── SpecularLighting.cs.meta
│ │ ├── Water.cs
│ │ ├── Water.cs.meta
│ │ ├── WaterBase.cs
│ │ ├── WaterBase.cs.meta
│ │ ├── WaterTile.cs
│ │ └── WaterTile.cs.meta
│ ├── Shaders.meta
│ ├── Shaders
│ │ ├── FXWaterPro.shader
│ │ └── FXWaterPro.shader.meta
│ ├── Textures.meta
│ └── Textures
│ │ ├── WaterBump.jpg
│ │ ├── WaterBump.jpg.meta
│ │ ├── WaterFresnel.psd
│ │ ├── WaterFresnel.psd.meta
│ │ ├── WaterProDaytimeGradient.psd
│ │ ├── WaterProDaytimeGradient.psd.meta
│ │ ├── WaterProNighttimeGradient.psd
│ │ └── WaterProNighttimeGradient.psd.meta
│ ├── Water4.meta
│ └── Water4
│ ├── Materials.meta
│ ├── Materials
│ ├── OceanPlaneMaterial.mat
│ ├── OceanPlaneMaterial.mat.meta
│ ├── Water4Advanced.mat
│ ├── Water4Advanced.mat.meta
│ ├── Water4Simple.mat
│ └── Water4Simple.mat.meta
│ ├── Models.meta
│ ├── Models
│ ├── OceanPlane.FBX
│ └── OceanPlane.FBX.meta
│ ├── Prefabs.meta
│ ├── Prefabs
│ ├── Water4Advanced.prefab
│ ├── Water4Advanced.prefab.meta
│ ├── Water4Simple.prefab
│ └── Water4Simple.prefab.meta
│ ├── Shaders.meta
│ ├── Shaders
│ ├── FXWater4Advanced.shader
│ ├── FXWater4Advanced.shader.meta
│ ├── FXWater4Simple.shader
│ ├── FXWater4Simple.shader.meta
│ ├── WaterInclude.cginc
│ └── WaterInclude.cginc.meta
│ ├── Textures.meta
│ └── Textures
│ ├── SimpleFoam.png
│ ├── SimpleFoam.png.meta
│ ├── SmallWaves.png
│ └── SmallWaves.png.meta
├── CHANGES.md
├── LICENSE.txt
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── NavMeshProjectSettings.asset
├── NetworkManager.asset
├── Physics2DSettings.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
└── UnityConnectSettings.asset
├── README-VR.md
├── README.md
└── nif.xml
/.gitignore:
--------------------------------------------------------------------------------
1 | # System files
2 | Thumbs.db
3 | Thumbs.db.meta
4 | *.DS_Store
5 | *.directory
6 | .vs
7 | .vscode
8 |
9 | # Android Build files
10 | *.apk
11 | *.obb
12 |
13 | # Visual Studio files
14 | *.cachefile
15 | *.csproj
16 | *.pidb
17 | *.sln
18 | *.suo
19 | *.unityproj
20 | *.user
21 | *.userprefs
22 | *.v11
23 | *.v12
24 | *.VC.db
25 | [C|c]onfig.ini
26 |
27 | # Folder to exclude
28 | [Bb]in
29 | [Dd]ebug*/
30 | [Rr]elease*/
31 | Builds/
32 | ipch/
33 | Library/
34 | obj/
35 | Temp/
36 | Data Files/
--------------------------------------------------------------------------------
/Assets/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b20b7eb76671f0b4388312a71c581a81
3 | folderAsset: yes
4 | timeCreated: 1475518284
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Materials/Sky.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 92eb28228f96ac444a9a51e476bf2cf3
3 | timeCreated: 1465089077
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Materials/Underwater_Reversed.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 82889a307a9eb8c4eb4cf458ecc902dd
3 | timeCreated: 1475745385
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a6b9a734c5ca55742838be272f387afc
3 | folderAsset: yes
4 | timeCreated: 1461534416
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Plugins/MP3Sharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColeDeanShepherd/TESUnity/f4d5e19f68da380da9da745356c7904f3428b9d6/Assets/Plugins/MP3Sharp.dll
--------------------------------------------------------------------------------
/Assets/Plugins/MP3Sharp.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7fd42d1716e93bc449ad8126dab7d926
3 | timeCreated: 1461534474
4 | licenseType: Free
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | Editor:
15 | enabled: 0
16 | settings:
17 | DefaultValueInitialized: true
18 | WindowsStoreApps:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | userData:
23 | assetBundleName:
24 | assetBundleVariant:
25 |
--------------------------------------------------------------------------------
/Assets/Prefabs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 727864e4f2e5f5349a49ecec835059aa
3 | folderAsset: yes
4 | timeCreated: 1461697915
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Prefabs/Player.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bb4f50960e3bc08459bb6f708eb7d79f
3 | timeCreated: 1478265346
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Prefabs/Spectator.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 05215c92a43574f4a884ac60658dc925
3 | timeCreated: 1478261110
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Prefabs/TESUnity.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d9a1ba27e850d6d478d4a64d027d1204
3 | timeCreated: 1461698038
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Prefabs/Water.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e8e3a26facab0b742b401e1c0da419dc
3 | timeCreated: 1463031390
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 42c77ec87d7d5044daeedba71d9d3ee3
3 | folderAsset: yes
4 | timeCreated: 1475517851
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fe0a5cfa7842c23419b51207ffabb53a
3 | folderAsset: yes
4 | timeCreated: 1475517876
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/BumpedDiffuse.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a5a2ed7dec6530f4290561a8fddcc05f
3 | timeCreated: 1475413068
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/BumpedDiffuseTransCutout.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 99a0e20f0a18120478fa6762b1153269
3 | timeCreated: 1475518231
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/Standard.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aa59a264c07340745a94d005661b3199
3 | timeCreated: 1475517819
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/StandardCutout.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4b4a867e70d287049b29e4be8887252d
3 | timeCreated: 1475520557
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/TESUnityAlphaBlend.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ece1e54de347c0a4b935159566ed2500
3 | timeCreated: 1475518196
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/TESUnityStandard.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4704d58012177bc4485a26a6fad2e89f
3 | timeCreated: 1475518196
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/TESUnityTested.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 816aed95cc4819f4d976b28a5c72be1d
3 | timeCreated: 1475518196
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/Unlit.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2fb90c2aec3c6134fbe9ac9f2b8fb820
3 | timeCreated: 1475517812
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/Materials/UnlitTransparentCutout.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4e2254165450b2f4cb8c16530e57d347
3 | timeCreated: 1475518196
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/UI.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cde8cc767e646f84593cadfe53e8dda5
3 | folderAsset: yes
4 | timeCreated: 1476016691
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Resources/UI/Book.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: de2517ff4a7a99a48a683bc2b1defec0
3 | timeCreated: 1476079839
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/UI/InteractiveText.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 077b1d90dd328134999603a3db4259c8
3 | timeCreated: 1476016694
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Resources/UI/Scroll.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0beda27bcd6e09c4cb8135ce4f3028b6
3 | timeCreated: 1476271693
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 70c8498f2d288bf4389fc5f677fa8c72
3 | folderAsset: yes
4 | timeCreated: 1461523844
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scenes/AskPathScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 46e30032f3a47fc4fbabc7234b162816
3 | timeCreated: 1461523859
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes/GameScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a8ff10dbfe696e45bca66d86c2f4347
3 | timeCreated: 1461523859
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d540b6e81cb1e1845b5b2cfe1d02e0ce
3 | folderAsset: yes
4 | timeCreated: 1461523871
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a9a33a9608c70df40a401ef46a7e580e
3 | folderAsset: yes
4 | timeCreated: 1474250035
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/ArrayRange.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 743fb1b564f62fe4484be74cee2e87fe
3 | timeCreated: 1462777265
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/ArrayUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: baa9a86eff133c742ae59297f641f81f
3 | timeCreated: 1505016538
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/AudioUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5995496c049e6854db47a70e095df9f8
3 | timeCreated: 1461606676
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/ColorUtils.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | public static class ColorUtils
4 | {
5 | public static Color B8G8R8ToColor(uint B8G8R8)
6 | {
7 | return B8G8R8ToColor32(B8G8R8);
8 | }
9 | public static Color32 B8G8R8ToColor32(uint B8G8R8)
10 | {
11 | var B8 = (byte)((B8G8R8 >> 16) & 0xFF);
12 | var G8 = (byte)((B8G8R8 >> 8) & 0xFF);
13 | var R8 = (byte)(B8G8R8 & 0xFF);
14 |
15 | return new Color32(R8, G8, B8, 255);
16 | }
17 |
18 | public static Color R5G6B5ToColor(ushort R5G6B5)
19 | {
20 | var R5 = ((R5G6B5 >> 11) & 31);
21 | var G6 = ((R5G6B5 >> 5) & 63);
22 | var B5 = (R5G6B5 & 31);
23 |
24 | return new Color((float)R5 / 31, (float)G6 / 63, (float)B5 / 31, 1);
25 | }
26 | public static Color32 R5G6B5ToColor32(ushort R5G6B5)
27 | {
28 | return R5G6B5ToColor(R5G6B5);
29 | }
30 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Core/ColorUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e8d0561be41ea1f47967b98e6de7e308
3 | timeCreated: 1462763057
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/DDSReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94795e085c8e1ff41b3c24d4eaf8199b
3 | timeCreated: 1462763026
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/Exceptions.cs:
--------------------------------------------------------------------------------
1 | namespace System.IO
2 | {
3 | ///
4 | /// A reimplementation of a standard exception type that was introduced in .NET 3.0.
5 | ///
6 | public class FileFormatException : FormatException
7 | {
8 | public FileFormatException() : base() { }
9 | public FileFormatException(string message) : base(message) { }
10 | public FileFormatException(string message, Exception innerException) : base(message, innerException) { }
11 | }
12 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Core/Exceptions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f12cce805a3d7cb488a480ee7d072263
3 | timeCreated: 1505016538
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/FlyingCameraComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4a3618a963c0cbe4982fa3b654a3f39b
3 | timeCreated: 1462636103
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/GUIUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10d05a9427a4155459476c6d48d374a8
3 | timeCreated: 1461694815
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/GameObjectUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d3fecafd2bebc2840ad01228b1f8cf5a
3 | timeCreated: 1462506485
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/MusicPlayer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 |
4 | // shuffles and repeats
5 | public class MusicPlayer
6 | {
7 | public void AddSong(string songFilePath)
8 | {
9 | songFilePaths.Add(songFilePath);
10 | }
11 | public void AddSongs(string[] songFilePaths)
12 | {
13 | this.songFilePaths.AddRange(songFilePaths);
14 | }
15 | public void Play()
16 | {
17 | currentSongIndex = GetNextSongIndex();
18 |
19 | if(currentSongIndex >= 0)
20 | {
21 | MP3StreamReader audioStream = new MP3StreamReader(songFilePaths[currentSongIndex]);
22 | currentAudioSourceObj = AudioUtils.Play2DAudioStream(audioStream);
23 | }
24 | }
25 | public void Update()
26 | {
27 | if(currentAudioSourceObj == null)
28 | {
29 | currentSongIndex = GetNextSongIndex();
30 |
31 | if(currentSongIndex >= 0)
32 | {
33 | MP3StreamReader audioStream = new MP3StreamReader(songFilePaths[currentSongIndex]);
34 | currentAudioSourceObj = AudioUtils.Play2DAudioStream(audioStream);
35 | }
36 | }
37 | }
38 |
39 | private List songFilePaths = new List();
40 | private int currentSongIndex = -1;
41 | private GameObject currentAudioSourceObj;
42 | private int GetNextSongIndex()
43 | {
44 | if(songFilePaths.Count == 0)
45 | {
46 | return -1;
47 | }
48 | else if(songFilePaths.Count == 1)
49 | {
50 | return 0;
51 | }
52 | else if(currentSongIndex < 0)
53 | {
54 | return Random.Range(0, songFilePaths.Count);
55 | }
56 | else
57 | {
58 | return (currentSongIndex + Random.Range(1, songFilePaths.Count - 1)) % songFilePaths.Count;
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Core/MusicPlayer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ca655fec2d85f0148bd3c0102d9f9ae7
3 | timeCreated: 1464137747
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/OneShotAudioStreamComponent.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | public class OneShotAudioStreamComponent : MonoBehaviour
4 | {
5 | public MP3StreamReader audioStream;
6 |
7 | /*private AudioSource audioSource;
8 |
9 | private void Awake()
10 | {
11 | audioSource = GetComponent();
12 | audioSource.Play();
13 | }
14 | private void Update()
15 | {
16 | if(audioStream != null && audioStream.isDoneStreaming)
17 | {
18 | Debug.Log(audioStream.streamedSampleFrameCount * audioStream.channelCount);
19 | audioStream = null;
20 | audioSource.loop = false;
21 | }
22 |
23 | if(!audioSource.isPlaying)
24 | {
25 | Destroy(gameObject, 0.5f);
26 | enabled = false;
27 | }
28 | }*/
29 |
30 | private PCMAudioBuffer streamBuffer;
31 | private int UnitySampleRate = -1;
32 |
33 | private void Start()
34 | {
35 | streamBuffer = new PCMAudioBuffer(audioStream.channelCount, audioStream.bitDepth, audioStream.samplingRate, 8192);
36 | UnitySampleRate = AudioSettings.outputSampleRate;
37 | }
38 | private void Update()
39 | {
40 | if(audioStream.isDoneStreaming)
41 | {
42 | Destroy(gameObject);
43 | enabled = false;
44 | }
45 | }
46 | private void OnAudioFilterRead(float[] samples, int channelCount)
47 | {
48 | if(UnitySampleRate > 0)
49 | {
50 | int lowSRSampleCount = (int)((44100.0f / UnitySampleRate) * samples.Length);
51 | var lowSRSamples = new float[lowSRSampleCount];
52 |
53 | int samplesReturned = AudioUtils.FillUnityStreamBuffer(lowSRSamples, streamBuffer, audioStream);
54 | AudioUtils.ResampleHack(lowSRSamples, samples);
55 | //AudioUtils.LowPassHack(samples);
56 |
57 | if(audioStream.isOpen && audioStream.isDoneStreaming)
58 | {
59 | audioStream.Close();
60 | }
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Core/OneShotAudioStreamComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6cdeea1427fb7d44fb9d3095d3aac389
3 | timeCreated: 1461569556
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/StringUtils.cs:
--------------------------------------------------------------------------------
1 | public static class StringUtils
2 | {
3 | ///
4 | /// Quickly checks if an ASCII encoded string is equal to a C# string.
5 | ///
6 | public static bool Equals(byte[] ASCIIBytes, string str)
7 | {
8 | if(ASCIIBytes.Length != str.Length)
9 | {
10 | return false;
11 | }
12 |
13 | for(int i = 0; i < ASCIIBytes.Length; i++)
14 | {
15 | if(ASCIIBytes[i] != str[i])
16 | {
17 | return false;
18 | }
19 | }
20 |
21 | return true;
22 | }
23 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Core/StringUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8233cb3c52edf2e48aace0868edbb006
3 | timeCreated: 1505016538
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/TemporalLoadBalancer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 |
5 | ///
6 | /// Distributes work (the execution of coroutines) over several frames to avoid freezes by soft-limiting execution time.
7 | ///
8 | public class TemporalLoadBalancer
9 | {
10 | ///
11 | /// Adds a task coroutine and returns it.
12 | ///
13 | public IEnumerator AddTask(IEnumerator taskCoroutine)
14 | {
15 | tasks.Add(taskCoroutine);
16 |
17 | return taskCoroutine;
18 | }
19 | public void CancelTask(IEnumerator taskCoroutine)
20 | {
21 | tasks.Remove(taskCoroutine);
22 | }
23 |
24 | public void RunTasks(float desiredWorkTime)
25 | {
26 | Debug.Assert(desiredWorkTime >= 0);
27 |
28 | if(tasks.Count == 0)
29 | {
30 | return;
31 | }
32 |
33 | stopwatch.Reset();
34 | stopwatch.Start();
35 |
36 | // Run the tasks.
37 | do
38 | {
39 | // Try to execute an iteration of a task. Remove the task if it's execution has completed.
40 | if(!tasks[0].MoveNext())
41 | {
42 | tasks.RemoveAt(0);
43 | }
44 | } while((tasks.Count > 0) && (stopwatch.Elapsed.TotalSeconds < desiredWorkTime));
45 |
46 | stopwatch.Stop();
47 | }
48 |
49 | public void WaitForTask(IEnumerator taskCoroutine)
50 | {
51 | Debug.Assert(tasks.Contains(taskCoroutine));
52 |
53 | while(taskCoroutine.MoveNext())
54 | { }
55 |
56 | tasks.Remove(taskCoroutine);
57 | }
58 | public void WaitForAllTasks()
59 | {
60 | foreach(var task in tasks)
61 | {
62 | while(task.MoveNext())
63 | { }
64 | }
65 |
66 | tasks.Clear();
67 | }
68 |
69 | private List tasks = new List();
70 | private Stopwatch stopwatch = new Stopwatch();
71 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Core/TemporalLoadBalancer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bee80cab33c088245bb00651aef78c8b
3 | timeCreated: 1505083803
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/Texture2DInfo.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | ///
4 | /// Stores information about a 2D texture.
5 | ///
6 | public class Texture2DInfo
7 | {
8 | public int width, height;
9 | public TextureFormat format;
10 | public bool hasMipmaps;
11 | public byte[] rawData;
12 |
13 | public Texture2DInfo(int width, int height, TextureFormat format, bool hasMipmaps, byte[] rawData)
14 | {
15 | this.width = width;
16 | this.height = height;
17 | this.format = format;
18 | this.hasMipmaps = hasMipmaps;
19 | this.rawData = rawData;
20 | }
21 |
22 | ///
23 | /// Creates a Unity Texture2D from this Texture2DInfo.
24 | ///
25 | public Texture2D ToTexture2D()
26 | {
27 | var texture = new Texture2D(width, height, format, hasMipmaps);
28 |
29 | if(rawData != null)
30 | {
31 | texture.LoadRawTextureData(rawData);
32 | texture.Apply();
33 | }
34 |
35 | return texture;
36 | }
37 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Core/Texture2DInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3bcab3a25f9b7964d852cbe1cd7b2d9b
3 | timeCreated: 1464657529
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/TextureUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 54f7bb83109195442b42d1111bd2ea1d
3 | timeCreated: 1461640172
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/UnityBinaryReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ec47c627b6eef334e9b6a4fc1cf8934a
3 | timeCreated: 1465008963
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/Utils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 38f0c4d5f6b53c44b9930a38bf871f9e
3 | timeCreated: 1462777631
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/Vector2i.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | ///
4 | /// A 2-dimensional vector with integer components.
5 | ///
6 | public struct Vector2i : IEquatable
7 | {
8 | public static Vector2i zero { get { return new Vector2i(0, 0); } }
9 | public static Vector2i right { get { return new Vector2i(1, 0); } }
10 | public static Vector2i up { get { return new Vector2i(0, 1); } }
11 | public static Vector2i one { get { return new Vector2i(1, 1); } }
12 |
13 | public static bool operator == (Vector2i a, Vector2i b)
14 | {
15 | return (a.x == b.x) && (a.y == b.y);
16 | }
17 | public static bool operator != (Vector2i a, Vector2i b)
18 | {
19 | return (a.x != b.x) || (a.y != b.y);
20 | }
21 |
22 | public int x, y;
23 |
24 | public Vector2i(int x, int y)
25 | {
26 | this.x = x;
27 | this.y = y;
28 | }
29 | public bool Equals(Vector2i other)
30 | {
31 | return (x == other.x) && (y == other.y);
32 | }
33 | public override int GetHashCode()
34 | {
35 | return x ^ y;
36 | }
37 | public override string ToString()
38 | {
39 | return "(" + x.ToString() + ", " + y.ToString() + ")";
40 | }
41 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Core/Vector2i.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a65d0a63c6fcb754f86cea0d437ab7c4
3 | timeCreated: 1462732664
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/Core/VirtualFileSystem.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d01a15d343dc8a6498a5793276f1792f
3 | timeCreated: 1462383945
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6f3da70bf241c324eaacf4c9daeeaa9c
3 | folderAsset: yes
4 | timeCreated: 1462762890
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/BSAFile.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d68f93e2f1bce274bb722c0fe1694458
3 | timeCreated: 1461627998
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/CellManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b10d253cf11d1f45a4f6ba8825f0336
3 | timeCreated: 1505019263
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 51d789855c6cc4e4dbe2744f6535927b
3 | folderAsset: yes
4 | timeCreated: 1475999880
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/PathSelectionComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e9550292f04c2cc4f8e2986e8f5954aa
3 | timeCreated: 1476386718
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/PlayerComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 287f98db0499ceb4cbcc95e7d53a7d21
3 | timeCreated: 1475999880
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/PlayerInventory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using TESUnity.Components.Records;
3 | using TESUnity.ESM;
4 | using UnityEngine;
5 |
6 | namespace TESUnity.Components
7 | {
8 | public class PlayerInventory : MonoBehaviour
9 | {
10 | private List _inventory = new List();
11 | private Transform _disabledObjects = null;
12 | private PlayerComponent _player = null;
13 |
14 | void Start()
15 | {
16 | var disabledObjectGO = new GameObject("DisabledObjects");
17 | disabledObjectGO.SetActive(false);
18 | _disabledObjects = disabledObjectGO.GetComponent();
19 | _player = GetComponent();
20 | }
21 |
22 | public void Add(GenericObjectComponent item)
23 | {
24 | Add(item.record);
25 |
26 | // For now.
27 | var weapon = item as WeaponComponent;
28 | if (weapon != null)
29 | {
30 | var rightHand = _player.rightHand;
31 | if (rightHand.childCount > 0)
32 | rightHand.GetChild(0).parent = _disabledObjects;
33 |
34 | ((WeaponComponent)item).Equip(rightHand);
35 | return;
36 | }
37 |
38 | item.transform.parent = _disabledObjects.transform;
39 | }
40 |
41 | public void Add(Record record)
42 | {
43 | _inventory.Add(record);
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/PlayerInventory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc55ed03eafa5ab40845a5fc46e6593d
3 | timeCreated: 1476098789
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/PostEffectManager.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityStandardAssets.CinematicEffects;
3 |
4 | namespace TESUnity.Components
5 | {
6 | [RequireComponent(typeof(Camera))]
7 | public class PostEffectManager : MonoBehaviour
8 | {
9 | void Awake()
10 | {
11 | var tes = TESUnity.instance;
12 |
13 | SetEffectEnabled(tes.ambientOcclusion);
14 | SetEffectEnabled(tes.antiAliasing);
15 | SetEffectEnabled(tes.bloom);
16 | }
17 |
18 | public void SetEffectEnabled(bool isEnabled) where T : MonoBehaviour
19 | {
20 | var effect = GetComponent();
21 | if (effect != null)
22 | effect.enabled = isEnabled;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/PostEffectManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e8e298e5c40ff74baee3e6259ce0c1d
3 | timeCreated: 1478265684
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 924211e1f4b64b5488ca9a6fbb81e70e
3 | folderAsset: yes
4 | timeCreated: 1476081573
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ActivatorComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class ActivatorComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | usable = true;
10 | pickable = false;
11 | var ACTI = (ACTIRecord)record;
12 | objData.name = ACTI.FNAM.value;
13 | objData.interactionPrefix = "Use ";
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ActivatorComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 282b17db4ed284845863cee5f80b8efe
3 | timeCreated: 1476121427
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/AlchemyApparatusComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class AlchemyApparatusComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | var APPA = (APPARecord)record;
10 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(WPDT.ITEX.value, "icons");
11 | objData.name = APPA.FNAM.value;
12 | objData.weight = APPA.AADT.weight.ToString();
13 | objData.value = APPA.AADT.value.ToString();
14 | objData.interactionPrefix = "Take ";
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/AlchemyApparatusComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd83d80219eaf914e89cdc20a6caacb5
3 | timeCreated: 1476121427
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/AlchemyComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class AlchemyComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | var ALCH = (ALCHRecord)record;
10 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(WPDT.ITEX.value, "icons");
11 | objData.name = ALCH.FNAM.value;
12 | objData.weight = ALCH.ALDT.weight.ToString();
13 | objData.value = ALCH.ALDT.value.ToString();
14 | objData.interactionPrefix = "Take ";
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/AlchemyComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 63ee4ffb96af8f34c825318862605f2f
3 | timeCreated: 1476121427
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ArmorComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class ArmorComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | var ARMO = (ARMORecord)record;
10 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(WPDT.ITEX.value, "icons");
11 | objData.name = ARMO.FNAM.value;
12 | objData.weight = ARMO.AODT.weight.ToString();
13 | objData.value = ARMO.AODT.value.ToString();
14 | objData.interactionPrefix = "Take ";
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ArmorComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 09685ccd14b88434dbaec8b14a0ea1ba
3 | timeCreated: 1476081573
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/BookComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1f1885f9316e9524aba32eef2214e161
3 | timeCreated: 1476081573
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ClothComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class ClothComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | var CLOT = (CLOTRecord)record;
10 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(WPDT.ITEX.value, "icons");
11 | objData.name = CLOT.FNAM.value;
12 | objData.weight = CLOT.CTDT.weight.ToString();
13 | objData.value = CLOT.CTDT.value.ToString();
14 | objData.interactionPrefix = "Take ";
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ClothComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 632900d6a56e9de4aa454e36bc410cd1
3 | timeCreated: 1476121427
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ContainerComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class ContainerComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | pickable = false;
10 | objData.name = ((CONTRecord)record).FNAM.value;
11 | objData.interactionPrefix = "Open ";
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ContainerComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 96313e469a7b23b4aa57eb5d9e58b751
3 | timeCreated: 1476081574
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/CreatureComponent.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class CreatureComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | transform.rotation = Quaternion.Euler(-70, 0, 0);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/CreatureComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 887052cb9d670da4e8c01b8174041941
3 | timeCreated: 1476424680
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/DoorComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04f29058e173d2a40ba7b65df6d13a54
3 | timeCreated: 1476081573
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/GenericObjectComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 423c408bcb691e74a911acaf207f4919
3 | timeCreated: 1476081573
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/IngredientComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class IngredientComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | var INGR = (INGRRecord)record;
10 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(INGR.ITEX.value, "icons");
11 | objData.name = INGR.FNAM.value;
12 | objData.weight = INGR.IRDT.weight.ToString();
13 | objData.value = INGR.IRDT.value.ToString();
14 | objData.interactionPrefix = "Take ";
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/IngredientComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 39ca8940ef3b33b4288f4916577b2cbc
3 | timeCreated: 1476081573
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/LightComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0abf0acbf59fd064987addebc6fb00fd
3 | timeCreated: 1476081573
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/LockComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class LockComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | usable = true;
10 | pickable = false;
11 | var LOCK = (LOCKRecord)record;
12 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(WPDT.ITEX.value, "icons");
13 | objData.name = LOCK.FNAM.value;
14 | objData.weight = LOCK.LKDT.weight.ToString();
15 | objData.value = LOCK.LKDT.value.ToString();
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/LockComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a81d51915b3b7344ebf6a2de63fc9718
3 | timeCreated: 1476121427
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/MiscObjectComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class MiscObjectComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | var MISC = (MISCRecord)record;
10 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(MISC.ITEX.value, "icons");
11 | objData.name = MISC.FNAM.value;
12 | objData.weight = MISC.MCDT.weight.ToString();
13 | objData.value = MISC.MCDT.value.ToString();
14 | objData.interactionPrefix = "Take ";
15 | }
16 |
17 | public override void Interact()
18 | {
19 |
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/MiscObjectComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59bd3657250b12d4a8b560e6e85fed61
3 | timeCreated: 1476081573
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/NPCComponent.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class NPCComponent : GenericObjectComponent
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/NPCComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 01e086aca521b3b43814b7e2cdb125a7
3 | timeCreated: 1476424680
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ProbComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class ProbComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | var PROB = (PROBRecord)record;
10 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(WPDT.ITEX.value, "icons");
11 | objData.name = PROB.FNAM.value;
12 | objData.weight = PROB.PBDT.weight.ToString();
13 | objData.value = PROB.PBDT.value.ToString();
14 | objData.interactionPrefix = "Take ";
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/ProbComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fe5833dfd7cad09429160976e41f8129
3 | timeCreated: 1476121427
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/RepaireComponent.cs:
--------------------------------------------------------------------------------
1 | using TESUnity.ESM;
2 |
3 | namespace TESUnity.Components.Records
4 | {
5 | public class RepaireComponent : GenericObjectComponent
6 | {
7 | void Start()
8 | {
9 | var REPA = (REPARecord)record;
10 | //objData.icon = TESUnity.instance.Engine.textureManager.LoadTexture(WPDT.ITEX.value, "icons");
11 | objData.name = REPA.FNAM.value;
12 | objData.weight = REPA.RIDT.weight.ToString();
13 | objData.value = REPA.RIDT.value.ToString();
14 | objData.interactionPrefix = "Take ";
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/RepaireComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 822d06b3866cc6b4cbe47e93e9b6b84c
3 | timeCreated: 1476121427
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/Records/WeaponComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c5fc1c7af59a10d41be75f95226c3370
3 | timeCreated: 1476081574
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/VR.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 16d6bf4c1e8ac9f438a7166fe51ebeb0
3 | folderAsset: yes
4 | timeCreated: 1478260222
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/VR/OculusHand.cs:
--------------------------------------------------------------------------------
1 | #if OCULUS
2 | using UnityEngine;
3 |
4 | namespace TESUnity.Components.VR
5 | {
6 | public class OculusHand : MonoBehaviour
7 | {
8 | private Transform _transform = null;
9 |
10 | public OVRInput.Controller TouchID { get; set; }
11 |
12 | void Start()
13 | {
14 | _transform = GetComponent();
15 |
16 | // Add Input Binding
17 |
18 | // TODO: Wait for Oculus Avatar to display hands.
19 | }
20 |
21 | void Update()
22 | {
23 | _transform.localPosition = OVRInput.GetLocalControllerPosition(TouchID);
24 | _transform.localRotation = OVRInput.GetLocalControllerRotation(TouchID);
25 | }
26 | }
27 | }
28 | #endif
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/VR/OculusHand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5cee5b9503805344baee4ebaaab33767
3 | timeCreated: 1479387438
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/VR/PlayerVRComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9afa197464882e469ecd9df334acd76
3 | timeCreated: 1476959286
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Components/VR/VRGazeUI.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0be9a3cc83314904e8580394a9e15c0e
3 | timeCreated: 1478260222
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Convert.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace TESUnity
4 | {
5 | public static class Convert
6 | {
7 | public const int yardInMWUnits = 64;
8 | public const float meterInYards = 1.09361f;
9 | public const float meterInMWUnits = meterInYards * yardInMWUnits;
10 |
11 | public const int exteriorCellSideLengthInMWUnits = 8192;
12 | public const float exteriorCellSideLengthInMeters = (float)exteriorCellSideLengthInMWUnits / meterInMWUnits;
13 |
14 | public static Quaternion RotationMatrixToQuaternion(Matrix4x4 matrix)
15 | {
16 | return Quaternion.LookRotation(matrix.GetColumn(2), matrix.GetColumn(1));
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Convert.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9af1a871dc3e8df4a97ba2be742f5b5a
3 | timeCreated: 1463008305
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/ESM.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: df63a8ab994ef1a499b785c3922a0cb2
3 | folderAsset: yes
4 | timeCreated: 1505017520
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/ESM/ESMFile.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2e5f335e5d3c34b4b8d0718898f186a1
3 | timeCreated: 1461620232
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/ESM/Records.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7184834f6fce64047a2f761b9dc86f3a
3 | timeCreated: 1475836989
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Effects.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb891dc142e571e4d8a32fd003287e5e
3 | folderAsset: yes
4 | timeCreated: 1475669637
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Effects/LightAnim.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 |
5 | namespace TESUnity
6 | {
7 | public enum LightAnimMode { None, Flicker, FlickerSlow, Pulse, PulseSlow, Fire }//None is included as courtesy
8 | public class LightAnim : MonoBehaviour
9 | {
10 | public LightAnimMode mode = LightAnimMode.None;
11 | new Light light;
12 | float baseIntensity = 1f;
13 |
14 | void Start ()
15 | {
16 | //Debug.Log("Animated Light Created: " + mode);
17 | light = GetComponent();
18 | baseIntensity = light.intensity;
19 | }
20 |
21 | void Update ()
22 | {
23 | float value = 1f;
24 | switch (mode)
25 | {
26 | case LightAnimMode.None:
27 | break;
28 | case LightAnimMode.Flicker:
29 | value = Mathf.Round(Mathf.Clamp01(Random.value + 0.1f));
30 | break;
31 | case LightAnimMode.FlickerSlow:
32 | value = Mathf.Round(Mathf.Clamp01(Random.value + 0.47f));
33 | break;
34 | case LightAnimMode.Pulse:
35 | value = Mathf.Sin(Time.time) * 0.5f + 0.5f;
36 | break;
37 | case LightAnimMode.PulseSlow:
38 | value = Mathf.Sin(Time.time * 0.5f) * 0.5f + 0.5f;
39 | break;
40 | case LightAnimMode.Fire:
41 | value = Mathf.PerlinNoise(Time.time * 0.8f , transform.position.x+transform.position.z * 7.9253618f);
42 | value = 1f - value;
43 | value = value * value * value;
44 | value = 1f - value;
45 | break;
46 | }
47 | light.intensity = Mathf.Lerp(0.2f * baseIntensity , baseIntensity , value);
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Effects/LightAnim.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4a49906d693a37045bedfc519546cce8
3 | timeCreated: 1465069851
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Effects/UnderwaterEffect.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace TESUnity.Effects
4 | {
5 | public sealed class UnderwaterEffect : MonoBehaviour
6 | {
7 | private bool _defaultFog;
8 | private Color _defaultFogColor;
9 | private float _defaultFogDensity;
10 | private Material _defaultSkybox = null;
11 | private bool _isUnderwater = false;
12 | private Transform _transform = null;
13 |
14 | [SerializeField]
15 | private float underwaterLevel = 0.0f;
16 | [SerializeField]
17 | private Color ambientColor = Color.white;
18 | [SerializeField]
19 | private Color fogColor = new Color(0, 0.4f, 0.7f, 0.6f);
20 | [SerializeField]
21 | private float fogDensity = 0.04f;
22 |
23 | public float Level
24 | {
25 | get { return underwaterLevel; }
26 | set { underwaterLevel = value; }
27 | }
28 |
29 | void Start()
30 | {
31 | _defaultFog = RenderSettings.fog;
32 | _defaultFogColor = RenderSettings.fogColor;
33 | _defaultFogDensity = RenderSettings.fogDensity;
34 | _defaultSkybox = RenderSettings.skybox;
35 | _transform = GetComponent();
36 | }
37 |
38 | void Update()
39 | {
40 | if (_transform.position.y < underwaterLevel && !_isUnderwater)
41 | SetEffectEnabled(true);
42 | else if (_transform.position.y > underwaterLevel && _isUnderwater)
43 | SetEffectEnabled(false);
44 | }
45 |
46 | public void SetEffectEnabled(bool enabled)
47 | {
48 | _isUnderwater = enabled;
49 | RenderSettings.fog = enabled;
50 | RenderSettings.fogColor = enabled ? fogColor : _defaultFogColor;
51 | RenderSettings.fogDensity = enabled ? fogDensity : _defaultFogDensity;
52 | RenderSettings.skybox = enabled ? null : _defaultSkybox;
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Effects/UnderwaterEffect.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb1b459650c67b649b95d456bd502958
3 | timeCreated: 1475669647
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/GameSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d515562c5ed57e7438f8e45527b979b4
3 | timeCreated: 1478178893
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/MaterialManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d550d3ae4b82d0d49aa6f74dba337028
3 | timeCreated: 1475492624
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fa2a521dd8302f54c9ae3279c73c10d3
3 | folderAsset: yes
4 | timeCreated: 1475492624
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Materials/MWBaseMaterial.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 | using UnityEngine.Rendering;
4 |
5 | namespace TESUnity
6 | {
7 | ///
8 | /// An abstract class to describe a material.
9 | ///
10 | public abstract class MWBaseMaterial
11 | {
12 | protected Dictionary m_existingMaterials;
13 | protected TextureManager m_textureManager;
14 |
15 | public MWBaseMaterial(TextureManager textureManager)
16 | {
17 | m_textureManager = textureManager;
18 | m_existingMaterials = new Dictionary();
19 | }
20 |
21 | public abstract Material BuildMaterialFromProperties(MWMaterialProps mp);
22 | public abstract Material BuildMaterial();
23 | public abstract Material BuildMaterialBlended(BlendMode sourceBlendMode, BlendMode destinationBlendMode);
24 | public abstract Material BuildMaterialTested(float cutoff = 0.5f);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Materials/MWBaseMaterial.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3a9aa721d27562d46a4f75259e27f033
3 | timeCreated: 1475492624
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Materials/MWBumpedDiffuseMaterial.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f45e98f2297c93f4c8ea3c05bffa86be
3 | timeCreated: 1475492624
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Materials/MWDefaultMaterial.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ec4d072728a80eb47bf9b99d4902a805
3 | timeCreated: 1475492624
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Materials/MWStandardMaterial.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 98f444a3782e69244a9c13f55a14566d
3 | timeCreated: 1475492624
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Materials/MWUnlitMaterial.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using ur = UnityEngine.Rendering;
3 |
4 | namespace TESUnity
5 | {
6 | ///
7 | /// A material that uses the Unlit Shader.
8 | ///
9 | public class MWUnliteMaterial : MWBaseMaterial
10 | {
11 | public MWUnliteMaterial(TextureManager textureManager) : base(textureManager) { }
12 |
13 | public override Material BuildMaterialFromProperties(MWMaterialProps mp)
14 | {
15 | Material material;
16 |
17 | //check if the material is already cached
18 | if (!m_existingMaterials.TryGetValue(mp, out material))
19 | {
20 | //otherwise create a new material and cache it
21 | if (mp.alphaBlended)
22 | material = BuildMaterialBlended(mp.srcBlendMode, mp.dstBlendMode);
23 | else if (mp.alphaTest)
24 | material = BuildMaterialTested(mp.alphaCutoff);
25 | else
26 | material = BuildMaterial();
27 |
28 | if (mp.textures.mainFilePath != null)
29 | material.mainTexture = m_textureManager.LoadTexture(mp.textures.mainFilePath);
30 |
31 | m_existingMaterials[mp] = material;
32 | }
33 | return material;
34 | }
35 |
36 | public override Material BuildMaterial()
37 | {
38 | return new Material(Shader.Find("Unlit/Texture"));
39 | }
40 |
41 | public override Material BuildMaterialBlended(ur.BlendMode sourceBlendMode, ur.BlendMode destinationBlendMode)
42 | {
43 | var material = BuildMaterialTested();
44 | material.SetInt("_SrcBlend", (int)sourceBlendMode);
45 | material.SetInt("_DstBlend", (int)destinationBlendMode);
46 | return material;
47 | }
48 |
49 | public override Material BuildMaterialTested(float cutoff = 0.5f)
50 | {
51 | Material material = new Material(Shader.Find("Unlit/Transparent Cutout"));
52 | material.SetFloat("_AlphaCutoff", cutoff);
53 | return material;
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/Materials/MWUnlitMaterial.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 88748d05cb69abd4894d5db3d5edd33d
3 | timeCreated: 1475493999
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/MorrowindDataReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7cf9fad84b70e03468099cef8cb59a91
3 | timeCreated: 1462391394
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/MorrowindEngine.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb6885d49240dc24e8a4c264d91533e0
3 | timeCreated: 1463714811
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/NIF.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 87c1d75a87f21204ba26a9c81df55a3f
3 | folderAsset: yes
4 | timeCreated: 1505017520
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/NIF/NIFManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c97638808ba3c184a8534af2b5a350ae
3 | timeCreated: 1505017520
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/NIF/NIFObjectBuilder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64c006d03f5656147b27acf1e24e572b
3 | timeCreated: 1505017520
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/NIF/NIFParserGenerator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1997da79ed1b0854bb8a951c48465006
3 | timeCreated: 1505017520
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/NIF/NIFReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: df9079d9523000945bffebdf613bff53
3 | timeCreated: 1505017520
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/NIF/NIFUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace TESUnity
6 | {
7 | public static class NIFUtils
8 | {
9 | public static Vector3 NifVectorToUnityVector(Vector3 NIFVector)
10 | {
11 | Utils.Swap(ref NIFVector.y, ref NIFVector.z);
12 |
13 | return NIFVector;
14 | }
15 | public static Vector3 NifPointToUnityPoint(Vector3 NIFPoint)
16 | {
17 | return NifVectorToUnityVector(NIFPoint) / Convert.meterInMWUnits;
18 | }
19 | public static Matrix4x4 NifRotationMatrixToUnityRotationMatrix(Matrix4x4 NIFRotationMatrix)
20 | {
21 | Matrix4x4 matrix = new Matrix4x4();
22 | matrix.m00 = NIFRotationMatrix.m00;
23 | matrix.m01 = NIFRotationMatrix.m02;
24 | matrix.m02 = NIFRotationMatrix.m01;
25 | matrix.m03 = 0;
26 | matrix.m10 = NIFRotationMatrix.m20;
27 | matrix.m11 = NIFRotationMatrix.m22;
28 | matrix.m12 = NIFRotationMatrix.m21;
29 | matrix.m13 = 0;
30 | matrix.m20 = NIFRotationMatrix.m10;
31 | matrix.m21 = NIFRotationMatrix.m12;
32 | matrix.m22 = NIFRotationMatrix.m11;
33 | matrix.m23 = 0;
34 | matrix.m30 = 0;
35 | matrix.m31 = 0;
36 | matrix.m32 = 0;
37 | matrix.m33 = 1;
38 |
39 | return matrix;
40 | }
41 | public static Quaternion NifRotationMatrixToUnityQuaternion(Matrix4x4 NIFRotationMatrix)
42 | {
43 | return Convert.RotationMatrixToQuaternion(NifRotationMatrixToUnityRotationMatrix(NIFRotationMatrix));
44 | }
45 | public static Quaternion NifEulerAnglesToUnityQuaternion(Vector3 NifEulerAngles)
46 | {
47 | var eulerAngles = NifVectorToUnityVector(NifEulerAngles);
48 |
49 | var xRot = Quaternion.AngleAxis(Mathf.Rad2Deg * eulerAngles.x, Vector3.right);
50 | var yRot = Quaternion.AngleAxis(Mathf.Rad2Deg * eulerAngles.y, Vector3.up);
51 | var zRot = Quaternion.AngleAxis(Mathf.Rad2Deg * eulerAngles.z, Vector3.forward);
52 |
53 | return xRot * zRot * yRot;
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/NIF/NIFUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 93ab7678c98245d4da3f4dcbc67f8450
3 | timeCreated: 1505017520
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/TESUnity.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f45c2eae24c43174a92eeaa8e8613dd6
3 | timeCreated: 1461523893
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/TextureManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 70e941dc06992be45823c4bf2e57d9ef
3 | timeCreated: 1464456263
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/UI.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4cfd29ea406f45d488bf7391d3740126
3 | folderAsset: yes
4 | timeCreated: 1476017031
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/UI/UIBook.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bac47b9f84e3d974e80fc296fc674999
3 | timeCreated: 1476079145
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/UI/UICrosshair.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 |
4 | namespace TESUnity.UI
5 | {
6 | [RequireComponent(typeof(Image))]
7 | public class UICrosshair : MonoBehaviour
8 | {
9 | private Image _crosshair = null;
10 |
11 | public bool Enabled
12 | {
13 | get { return _crosshair.enabled; }
14 | set { _crosshair.enabled = value; }
15 | }
16 |
17 | void Start()
18 | {
19 | var textureManager = TESUnity.instance.TextureManager;
20 | var crosshairTexture = textureManager.LoadTexture("target", true);
21 | _crosshair = GetComponent();
22 | _crosshair.sprite = GUIUtils.CreateSprite(crosshairTexture);
23 | }
24 |
25 | public void SetActive(bool active)
26 | {
27 | gameObject.SetActive(active);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/UI/UICrosshair.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 538e06f691a3eb245a87164fee88a92c
3 | timeCreated: 1476959286
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/UI/UIInteractiveText.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 | using UnityEngine.UI;
4 |
5 | namespace TESUnity.UI
6 | {
7 | public class UIInteractiveText : MonoBehaviour
8 | {
9 | private const int WidgetWidth = 200;
10 | private const int WidgetHeight = 100;
11 |
12 | private bool _opened;
13 |
14 | [SerializeField]
15 | private GameObject _container = null;
16 | [SerializeField]
17 | private Image _icon = null;
18 | [SerializeField]
19 | private Text _title = null;
20 |
21 | [SerializeField]
22 | private GameObject _inventoryInfos = null;
23 | [SerializeField]
24 | private Text _weight = null;
25 | [SerializeField]
26 | private Text _value = null;
27 |
28 | void Start()
29 | {
30 | _opened = false;
31 | _container.SetActive(false);
32 | }
33 |
34 | public void Show(Sprite icon, string prefixTitle, string title, string weight, string value)
35 | {
36 | _icon.enabled = icon != null;
37 | if (_icon.enabled)
38 | _icon.sprite = icon;
39 |
40 | _title.text = string.IsNullOrEmpty(prefixTitle) ? title : prefixTitle + title;
41 |
42 | var showInventoryInfos = !string.IsNullOrEmpty(weight) && !string.IsNullOrEmpty(value);
43 |
44 | _inventoryInfos.SetActive(showInventoryInfos);
45 | _container.GetComponent().SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, showInventoryInfos ? WidgetHeight : WidgetHeight / 2.0f);
46 |
47 | if (showInventoryInfos)
48 | {
49 | _weight.text = "Weight: " + weight;
50 | _value.text = "Value: " + value;
51 | }
52 |
53 | _container.SetActive(true);
54 | _opened = true;
55 | }
56 |
57 | public void Close()
58 | {
59 | if (_opened)
60 | {
61 | _container.SetActive(false);
62 | _opened = false;
63 | }
64 | }
65 | }
66 | }
--------------------------------------------------------------------------------
/Assets/Scripts/TES/UI/UIInteractiveText.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: edbaf40d891757c449a7d199e03a4f14
3 | timeCreated: 1476017031
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/TES/UI/UIManager.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace TESUnity.UI
4 | {
5 | [RequireComponent(typeof(Canvas))]
6 | public class UIManager : MonoBehaviour
7 | {
8 | private Canvas _canvas = null;
9 | private Transform _hudTransform = null;
10 | private Transform _uiTransform = null;
11 |
12 | [Header("HUD Elements")]
13 | [SerializeField]
14 | private UICrosshair _crosshair = null;
15 | [SerializeField]
16 | private UIInteractiveText _interactiveText = null;
17 |
18 | [Header("UI Elements")]
19 | [SerializeField]
20 | private UIBook _book = null;
21 | [SerializeField]
22 | private UIScroll _scroll = null;
23 |
24 | #region Public Fields
25 |
26 | public UIBook Book
27 | {
28 | get { return _book; }
29 | }
30 |
31 | public UIInteractiveText InteractiveText
32 | {
33 | get { return _interactiveText; }
34 | }
35 |
36 | public UIScroll Scroll
37 | {
38 | get { return _scroll; }
39 | }
40 |
41 | public UICrosshair Crosshair
42 | {
43 | get { return _crosshair; }
44 | }
45 |
46 | public Transform HUD
47 | {
48 | get { return _hudTransform; }
49 | }
50 |
51 | public Transform UI
52 | {
53 | get { return _uiTransform; }
54 | }
55 |
56 | public bool Visible
57 | {
58 | get { return _canvas.enabled; }
59 | set { _canvas.enabled = value; }
60 | }
61 |
62 | public bool Active
63 | {
64 | get { return _hudTransform.gameObject.activeSelf; }
65 | set
66 | {
67 | _hudTransform.gameObject.SetActive(value);
68 | _uiTransform.gameObject.SetActive(value);
69 | }
70 | }
71 |
72 | #endregion
73 |
74 | void Awake()
75 | {
76 | _canvas = GetComponent