├── .gitignore ├── Assets ├── CityNameplate.cs ├── CityNameplate.cs.meta ├── CityNameplateController.cs ├── CityNameplateController.cs.meta ├── FaceCamera.cs ├── FaceCamera.cs.meta ├── MapObjectNamePlate.cs ├── MapObjectNamePlate.cs.meta ├── Materials.meta ├── Materials │ ├── SelectionIndicator.mat │ ├── SelectionIndicator.mat.meta │ ├── Terrain.meta │ └── Terrain │ │ ├── Desert.mat │ │ ├── Desert.mat.meta │ │ ├── Forest.mat │ │ ├── Forest.mat.meta │ │ ├── Grassland.mat │ │ ├── Grassland.mat.meta │ │ ├── Mountain.mat │ │ ├── Mountain.mat.meta │ │ ├── Plain.mat │ │ ├── Plain.mat.meta │ │ ├── Water.mat │ │ └── Water.mat.meta ├── Models.meta ├── Models │ ├── City01.blend │ ├── City01.blend.meta │ ├── City01.blend1 │ ├── City01.blend1.meta │ ├── Forest.blend │ ├── Forest.blend.meta │ ├── Forest.blend1 │ ├── Forest.blend1.meta │ ├── HexHill.blend │ ├── HexHill.blend.meta │ ├── HexHill.blend1 │ ├── HexHill.blend1.meta │ ├── HexModel.blend │ ├── HexModel.blend.meta │ ├── HexMountain.blend │ ├── HexMountain.blend.meta │ ├── HexMountain.blend1 │ ├── HexMountain.blend1.meta │ ├── HexSelection.blend │ ├── HexSelection.blend.meta │ ├── HexSelection.blend1 │ ├── HexSelection.blend1.meta │ ├── Materials.meta │ ├── Materials │ │ ├── unnamed.mat │ │ └── unnamed.mat.meta │ ├── OpenGameArt.meta │ └── OpenGameArt │ │ ├── Materials.meta │ │ ├── Materials │ │ ├── BODY_normal_002.mat │ │ ├── BODY_normal_002.mat.meta │ │ ├── Dwarf Leather.mat │ │ ├── Dwarf Leather.mat.meta │ │ ├── Eye_brown.mat │ │ ├── Eye_brown.mat.meta │ │ ├── Hair12Main2k.mat │ │ ├── Hair12Main2k.mat.meta │ │ ├── HorseMain2k00.mat │ │ ├── HorseMain2k00.mat.meta │ │ ├── Material.mat │ │ ├── Material.mat.meta │ │ ├── Metal Armor.mat │ │ ├── Metal Armor.mat.meta │ │ ├── b_color.mat │ │ ├── b_color.mat.meta │ │ ├── cloth_mat.mat │ │ ├── cloth_mat.mat.meta │ │ ├── dwarf_leather_belt.png │ │ ├── dwarf_leather_belt.png.meta │ │ ├── dwarf_metal_armor.png │ │ ├── dwarf_metal_armor.png.meta │ │ ├── dwarf_skin.png │ │ ├── dwarf_skin.png.meta │ │ ├── dwarf_tunic.png │ │ ├── dwarf_tunic.png.meta │ │ ├── untitled.mat │ │ └── untitled.mat.meta │ │ ├── SOURCE.txt │ │ ├── SOURCE.txt.meta │ │ ├── fixed.blend │ │ ├── fixed.blend.meta │ │ ├── riggedHorse.blend │ │ └── riggedHorse.blend.meta ├── Prefabs.meta ├── Prefabs │ ├── City01.prefab │ ├── City01.prefab.meta │ ├── Dwarf.prefab │ ├── Dwarf.prefab.meta │ ├── ForestPrefab.prefab │ ├── ForestPrefab.prefab.meta │ ├── HexPrefab.prefab │ ├── HexPrefab.prefab.meta │ ├── UI.meta │ ├── UI │ │ ├── BuildableItem.prefab │ │ ├── BuildableItem.prefab.meta │ │ ├── CityNamePlate.prefab │ │ └── CityNamePlate.prefab.meta │ ├── Unit.Dwarf.prefab │ └── Unit.Dwarf.prefab.meta ├── QPath.meta ├── QPath │ ├── IQPathTile.cs │ ├── IQPathTile.cs.meta │ ├── IQPathUnit.cs │ ├── IQPathUnit.cs.meta │ ├── IQPathWorld.cs │ ├── IQPathWorld.cs.meta │ ├── PathfindingPriorityQueue.cs │ ├── PathfindingPriorityQueue.cs.meta │ ├── Priority Queue.meta │ ├── Priority Queue │ │ ├── FastPriorityQueue.cs │ │ ├── FastPriorityQueue.cs.meta │ │ ├── FastPriorityQueueNode.cs │ │ ├── FastPriorityQueueNode.cs.meta │ │ ├── GenericPriorityQueue.cs │ │ ├── GenericPriorityQueue.cs.meta │ │ ├── GenericPriorityQueueNode.cs │ │ ├── GenericPriorityQueueNode.cs.meta │ │ ├── IFixedSizePriorityQueue.cs │ │ ├── IFixedSizePriorityQueue.cs.meta │ │ ├── IPriorityQueue.cs │ │ ├── IPriorityQueue.cs.meta │ │ ├── Priority Queue.csproj.meta │ │ ├── Priority Queue.nuspec │ │ ├── Priority Queue.nuspec.meta │ │ ├── Properties.meta │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── AssemblyInfo.cs.meta │ │ ├── SimplePriorityQueue.cs │ │ ├── SimplePriorityQueue.cs.meta │ │ ├── StablePriorityQueue.cs │ │ ├── StablePriorityQueue.cs.meta │ │ ├── StablePriorityQueueNode.cs │ │ ├── StablePriorityQueueNode.cs.meta │ │ ├── packages.config │ │ └── packages.config.meta │ ├── QPath.cs │ ├── QPath.cs.meta │ ├── QPath_AStar.cs │ ├── QPath_AStar.cs.meta │ ├── QPath_TileGraph.cs │ └── QPath_TileGraph.cs.meta ├── Scripts.meta ├── Scripts │ ├── BuildingJob.cs │ ├── BuildingJob.cs.meta │ ├── CameraKeyboardController.cs │ ├── CameraKeyboardController.cs.meta │ ├── CameraMotion.cs │ ├── CameraMotion.cs.meta │ ├── City.cs │ ├── City.cs.meta │ ├── Database.meta │ ├── Database │ │ ├── BuildingDatabase.cs │ │ └── BuildingDatabase.cs.meta │ ├── Hex.cs │ ├── Hex.cs.meta │ ├── HexComponent.cs │ ├── HexComponent.cs.meta │ ├── HexMap.cs │ ├── HexMap.cs.meta │ ├── HexMap_Continent.cs │ ├── HexMap_Continent.cs.meta │ ├── MapObject.cs │ ├── MapObject.cs.meta │ ├── MouseController.cs │ ├── MouseController.cs.meta │ ├── Player.cs │ ├── Player.cs.meta │ ├── TurnController.cs │ ├── TurnController.cs.meta │ ├── UI.meta │ ├── UI │ │ ├── BuildCityButton.cs │ │ ├── BuildCityButton.cs.meta │ │ ├── FitGridToChildren.cs │ │ ├── FitGridToChildren.cs.meta │ │ ├── ListBuildableItems.cs │ │ ├── ListBuildableItems.cs.meta │ │ ├── SkipUnitTurnButton.cs │ │ ├── SkipUnitTurnButton.cs.meta │ │ ├── UnitSelectionPanel.cs │ │ └── UnitSelectionPanel.cs.meta │ ├── Unit.cs │ ├── Unit.cs.meta │ ├── UnitView.cs │ └── UnitView.cs.meta ├── SelectionController.cs ├── SelectionController.cs.meta ├── TurnNumberText.cs ├── TurnNumberText.cs.meta ├── UI Images.meta ├── UI Images │ ├── blue_button00.png │ ├── blue_button00.png.meta │ ├── blue_button01.png │ ├── blue_button01.png.meta │ ├── blue_button02.png │ ├── blue_button02.png.meta │ ├── blue_circle.png │ ├── blue_circle.png.meta │ ├── blue_panel.png │ └── blue_panel.png.meta ├── _SCENE_.meta ├── _SCENE_.unity ├── _SCENE_.unity.meta └── _SCENE_ │ ├── LightingData.asset │ ├── LightingData.asset.meta │ ├── ReflectionProbe-0.exr │ └── ReflectionProbe-0.exr.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Autogenerated VS/MD solution and project files 9 | ExportedObj/ 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.svd 20 | 21 | 22 | # Unity3D generated meta files 23 | *.pidb.meta 24 | 25 | # Unity3D Generated File On Crash Reports 26 | sysinfo.txt 27 | 28 | # Builds 29 | *.apk 30 | *.unitypackage 31 | -------------------------------------------------------------------------------- /Assets/CityNameplate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using UnityEngine.EventSystems; 6 | 7 | public class CityNameplate : MonoBehaviour, IPointerClickHandler { 8 | 9 | public City MyCity; 10 | 11 | public void OnPointerClick(PointerEventData eventData) 12 | { 13 | //MapObjectNamePlate monp = GetComponent(); 14 | 15 | GameObject.FindObjectOfType().SelectedCity = MyCity; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assets/CityNameplate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c3474a3f8f09304b8a5bb711442b927 3 | timeCreated: 1503168577 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/CityNameplateController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CityNameplateController : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | GameObject.FindObjectOfType().OnCityCreated += CreateCityNameplate; 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | 17 | public GameObject CityNameplatePrefab; 18 | 19 | public void CreateCityNameplate( City city, GameObject cityGO ) 20 | { 21 | GameObject nameGO = (GameObject)Instantiate(CityNameplatePrefab, this.transform); 22 | nameGO.GetComponent().MyTarget = cityGO; 23 | nameGO.GetComponentInChildren().MyCity = city; 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/CityNameplateController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93f265330a2563f4a90bfbf5ae310a06 3 | timeCreated: 1503164893 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/FaceCamera.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class FaceCamera : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | if(TheCamera == null) 10 | TheCamera = Camera.main; 11 | } 12 | 13 | public Camera TheCamera; 14 | 15 | // Update is called once per frame 16 | void Update () { 17 | transform.rotation = TheCamera.transform.rotation; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/FaceCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd899f20830cc25429f2e6444c5c49de 3 | timeCreated: 1503163572 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/MapObjectNamePlate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class MapObjectNamePlate : MonoBehaviour { 7 | 8 | // Use this for initialization 9 | void Start () { 10 | if(TheCamera == null) 11 | TheCamera = Camera.main; 12 | 13 | rectTransform = GetComponent(); 14 | } 15 | 16 | public GameObject MyTarget; 17 | public Vector3 WorldPositionOffset = new Vector3(0, 1, 0); 18 | public Vector3 ScreenPositionOffset = new Vector3(0, 30, 0); 19 | 20 | public Camera TheCamera; 21 | 22 | RectTransform rectTransform; 23 | 24 | // Update is called once per frame 25 | void LateUpdate () { 26 | if(MyTarget == null) 27 | { 28 | // The object we're supposed to track has been removed, so let's destroy ourselves. 29 | Destroy(gameObject); 30 | return; 31 | } 32 | 33 | // Find out the screen position of our object and set ourselves to that, plus offset 34 | Vector3 screenPos = TheCamera.WorldToScreenPoint( MyTarget.transform.position + WorldPositionOffset ); 35 | 36 | rectTransform.anchoredPosition = screenPos + ScreenPositionOffset; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/MapObjectNamePlate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c2da93348f389740b61ee24a87d175f 3 | timeCreated: 1503164136 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/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc4b66209f8813f4aacb6b6b670abefa 3 | folderAsset: yes 4 | timeCreated: 1493921120 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/SelectionIndicator.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Materials/SelectionIndicator.mat -------------------------------------------------------------------------------- /Assets/Materials/SelectionIndicator.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3203e5725c0958a41b9a06fef9120b5a 3 | timeCreated: 1504975393 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Terrain.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0dcb634c2355574288ec497a0849561 3 | folderAsset: yes 4 | timeCreated: 1493921125 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Desert.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Materials/Terrain/Desert.mat -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Desert.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ab78643840c5ba478dbe42e382f67e7 3 | timeCreated: 1493921140 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Forest.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Materials/Terrain/Forest.mat -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Forest.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db72eda2e0f24c04abb9c7bd16d6be50 3 | timeCreated: 1496169819 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Grassland.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Materials/Terrain/Grassland.mat -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Grassland.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48bc4fa349e475a47969919bf72835b5 3 | timeCreated: 1493921133 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Mountain.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Materials/Terrain/Mountain.mat -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Mountain.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d715d2ca0d78444d9d0c76ac0003963 3 | timeCreated: 1493921140 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Plain.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Materials/Terrain/Plain.mat -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Plain.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02459ed6d7e9a194ba4a83032cd2b6ac 3 | timeCreated: 1493921140 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Water.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Materials/Terrain/Water.mat -------------------------------------------------------------------------------- /Assets/Materials/Terrain/Water.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f0b3d2adf6521c4581974ee9a2f11c9 3 | timeCreated: 1493921140 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 741335b5cdc61a84393471d5f8998b40 3 | folderAsset: yes 4 | timeCreated: 1493917119 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/City01.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/City01.blend -------------------------------------------------------------------------------- /Assets/Models/City01.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67c5ba2fdada51b4f82ef469490b5b23 3 | timeCreated: 1503158127 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 21 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 100002: Cylinder 10 | 100004: Cylinder_001 11 | 100006: Cylinder_002 12 | 100008: Cylinder_003 13 | 100010: Cylinder_004 14 | 400000: //RootNode 15 | 400002: Cylinder 16 | 400004: Cylinder_001 17 | 400006: Cylinder_002 18 | 400008: Cylinder_003 19 | 400010: Cylinder_004 20 | 2300000: Cylinder 21 | 2300002: Cylinder_001 22 | 2300004: Cylinder_002 23 | 2300006: Cylinder_003 24 | 2300008: Cylinder_004 25 | 3300000: Cylinder 26 | 3300002: Cylinder_001 27 | 3300004: Cylinder_002 28 | 3300006: Cylinder_003 29 | 3300008: Cylinder_004 30 | 4300000: Cylinder_004 31 | 4300002: Cylinder_003 32 | 4300004: Cylinder_002 33 | 4300006: Cylinder_001 34 | 4300008: Cylinder 35 | materials: 36 | importMaterials: 1 37 | materialName: 0 38 | materialSearch: 1 39 | animations: 40 | legacyGenerateAnimations: 4 41 | bakeSimulation: 0 42 | resampleCurves: 1 43 | optimizeGameObjects: 0 44 | motionNodeName: 45 | rigImportErrors: 46 | rigImportWarnings: 47 | animationImportErrors: 48 | animationImportWarnings: 49 | animationRetargetingWarnings: 50 | animationDoRetargetingWarnings: 0 51 | animationCompression: 1 52 | animationRotationError: 0.5 53 | animationPositionError: 0.5 54 | animationScaleError: 0.5 55 | animationWrapMode: 0 56 | extraExposedTransformPaths: [] 57 | extraUserProperties: [] 58 | clipAnimations: [] 59 | isReadable: 1 60 | meshes: 61 | lODScreenPercentages: [] 62 | globalScale: 1 63 | meshCompression: 0 64 | addColliders: 0 65 | importVisibility: 1 66 | importBlendShapes: 1 67 | importCameras: 1 68 | importLights: 1 69 | swapUVChannels: 0 70 | generateSecondaryUV: 0 71 | useFileUnits: 1 72 | optimizeMeshForGPU: 1 73 | keepQuads: 0 74 | weldVertices: 1 75 | secondaryUVAngleDistortion: 8 76 | secondaryUVAreaDistortion: 15.000001 77 | secondaryUVHardAngle: 88 78 | secondaryUVPackMargin: 4 79 | useFileScale: 1 80 | tangentSpace: 81 | normalSmoothAngle: 60 82 | normalImportMode: 0 83 | tangentImportMode: 3 84 | normalCalculationMode: 4 85 | importAnimation: 1 86 | copyAvatar: 0 87 | humanDescription: 88 | serializedVersion: 2 89 | human: [] 90 | skeleton: [] 91 | armTwist: 0.5 92 | foreArmTwist: 0.5 93 | upperLegTwist: 0.5 94 | legTwist: 0.5 95 | armStretch: 0.05 96 | legStretch: 0.05 97 | feetSpacing: 0 98 | rootMotionBoneName: 99 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 100 | hasTranslationDoF: 0 101 | hasExtraRoot: 0 102 | skeletonHasParents: 1 103 | lastHumanDescriptionAvatarSource: {instanceID: 0} 104 | animationType: 0 105 | humanoidOversampling: 1 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Assets/Models/City01.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/City01.blend1 -------------------------------------------------------------------------------- /Assets/Models/City01.blend1.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 017c71c278b94e94582c2576f05196df 3 | timeCreated: 1503158971 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/Forest.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/Forest.blend -------------------------------------------------------------------------------- /Assets/Models/Forest.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6128e79bc18d19a47bd951baf9c5b7b6 3 | timeCreated: 1493917081 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: Cylinder 13 | 4300002: Forest 14 | 7400000: Default Take 15 | 9500000: //RootNode 16 | materials: 17 | importMaterials: 1 18 | materialName: 0 19 | materialSearch: 1 20 | animations: 21 | legacyGenerateAnimations: 4 22 | bakeSimulation: 0 23 | resampleCurves: 1 24 | optimizeGameObjects: 0 25 | motionNodeName: 26 | rigImportErrors: 27 | rigImportWarnings: 28 | animationImportErrors: 29 | animationImportWarnings: 30 | animationRetargetingWarnings: 31 | animationDoRetargetingWarnings: 0 32 | animationCompression: 1 33 | animationRotationError: 0.5 34 | animationPositionError: 0.5 35 | animationScaleError: 0.5 36 | animationWrapMode: 0 37 | extraExposedTransformPaths: [] 38 | clipAnimations: [] 39 | isReadable: 1 40 | meshes: 41 | lODScreenPercentages: [] 42 | globalScale: 1 43 | meshCompression: 0 44 | addColliders: 0 45 | importBlendShapes: 1 46 | swapUVChannels: 0 47 | generateSecondaryUV: 0 48 | useFileUnits: 1 49 | optimizeMeshForGPU: 1 50 | keepQuads: 0 51 | weldVertices: 1 52 | secondaryUVAngleDistortion: 8 53 | secondaryUVAreaDistortion: 15.000001 54 | secondaryUVHardAngle: 88 55 | secondaryUVPackMargin: 4 56 | useFileScale: 1 57 | tangentSpace: 58 | normalSmoothAngle: 60 59 | normalImportMode: 0 60 | tangentImportMode: 3 61 | importAnimation: 1 62 | copyAvatar: 0 63 | humanDescription: 64 | serializedVersion: 2 65 | human: [] 66 | skeleton: [] 67 | armTwist: 0.5 68 | foreArmTwist: 0.5 69 | upperLegTwist: 0.5 70 | legTwist: 0.5 71 | armStretch: 0.05 72 | legStretch: 0.05 73 | feetSpacing: 0 74 | rootMotionBoneName: 75 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 76 | hasTranslationDoF: 0 77 | hasExtraRoot: 0 78 | skeletonHasParents: 1 79 | lastHumanDescriptionAvatarSource: {instanceID: 0} 80 | animationType: 2 81 | humanoidOversampling: 1 82 | additionalBone: 0 83 | userData: 84 | assetBundleName: 85 | assetBundleVariant: 86 | -------------------------------------------------------------------------------- /Assets/Models/Forest.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/Forest.blend1 -------------------------------------------------------------------------------- /Assets/Models/Forest.blend1.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69e979e69d69140438bedbed033d01b4 3 | timeCreated: 1496169696 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/HexHill.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/HexHill.blend -------------------------------------------------------------------------------- /Assets/Models/HexHill.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91f4311fd10b4fd4aaeb00b581fd24e8 3 | timeCreated: 1493917081 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: Cylinder 13 | 7400000: Default Take 14 | 9500000: //RootNode 15 | materials: 16 | importMaterials: 1 17 | materialName: 0 18 | materialSearch: 1 19 | animations: 20 | legacyGenerateAnimations: 4 21 | bakeSimulation: 0 22 | resampleCurves: 1 23 | optimizeGameObjects: 0 24 | motionNodeName: 25 | rigImportErrors: 26 | rigImportWarnings: 27 | animationImportErrors: 28 | animationImportWarnings: 29 | animationRetargetingWarnings: 30 | animationDoRetargetingWarnings: 0 31 | animationCompression: 1 32 | animationRotationError: 0.5 33 | animationPositionError: 0.5 34 | animationScaleError: 0.5 35 | animationWrapMode: 0 36 | extraExposedTransformPaths: [] 37 | clipAnimations: [] 38 | isReadable: 1 39 | meshes: 40 | lODScreenPercentages: [] 41 | globalScale: 1 42 | meshCompression: 0 43 | addColliders: 0 44 | importBlendShapes: 1 45 | swapUVChannels: 0 46 | generateSecondaryUV: 0 47 | useFileUnits: 1 48 | optimizeMeshForGPU: 1 49 | keepQuads: 0 50 | weldVertices: 1 51 | secondaryUVAngleDistortion: 8 52 | secondaryUVAreaDistortion: 15.000001 53 | secondaryUVHardAngle: 88 54 | secondaryUVPackMargin: 4 55 | useFileScale: 1 56 | tangentSpace: 57 | normalSmoothAngle: 60 58 | normalImportMode: 0 59 | tangentImportMode: 3 60 | importAnimation: 1 61 | copyAvatar: 0 62 | humanDescription: 63 | serializedVersion: 2 64 | human: [] 65 | skeleton: [] 66 | armTwist: 0.5 67 | foreArmTwist: 0.5 68 | upperLegTwist: 0.5 69 | legTwist: 0.5 70 | armStretch: 0.05 71 | legStretch: 0.05 72 | feetSpacing: 0 73 | rootMotionBoneName: 74 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 75 | hasTranslationDoF: 0 76 | hasExtraRoot: 0 77 | skeletonHasParents: 1 78 | lastHumanDescriptionAvatarSource: {instanceID: 0} 79 | animationType: 2 80 | humanoidOversampling: 1 81 | additionalBone: 0 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/Models/HexHill.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/HexHill.blend1 -------------------------------------------------------------------------------- /Assets/Models/HexHill.blend1.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e68db12d776d6b44b4976939822fd39 3 | timeCreated: 1496168314 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/HexModel.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/HexModel.blend -------------------------------------------------------------------------------- /Assets/Models/HexModel.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4f4e2ebd7661f74aa2a54440b0fe279 3 | timeCreated: 1493917081 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: Cylinder 13 | 7400000: Default Take 14 | 9500000: //RootNode 15 | materials: 16 | importMaterials: 1 17 | materialName: 0 18 | materialSearch: 1 19 | animations: 20 | legacyGenerateAnimations: 4 21 | bakeSimulation: 0 22 | resampleCurves: 1 23 | optimizeGameObjects: 0 24 | motionNodeName: 25 | rigImportErrors: 26 | rigImportWarnings: 27 | animationImportErrors: 28 | animationImportWarnings: 29 | animationRetargetingWarnings: 30 | animationDoRetargetingWarnings: 0 31 | animationCompression: 1 32 | animationRotationError: 0.5 33 | animationPositionError: 0.5 34 | animationScaleError: 0.5 35 | animationWrapMode: 0 36 | extraExposedTransformPaths: [] 37 | clipAnimations: [] 38 | isReadable: 1 39 | meshes: 40 | lODScreenPercentages: [] 41 | globalScale: 1 42 | meshCompression: 0 43 | addColliders: 0 44 | importBlendShapes: 1 45 | swapUVChannels: 0 46 | generateSecondaryUV: 0 47 | useFileUnits: 1 48 | optimizeMeshForGPU: 1 49 | keepQuads: 0 50 | weldVertices: 1 51 | secondaryUVAngleDistortion: 8 52 | secondaryUVAreaDistortion: 15.000001 53 | secondaryUVHardAngle: 88 54 | secondaryUVPackMargin: 4 55 | useFileScale: 1 56 | tangentSpace: 57 | normalSmoothAngle: 60 58 | normalImportMode: 0 59 | tangentImportMode: 3 60 | importAnimation: 1 61 | copyAvatar: 0 62 | humanDescription: 63 | serializedVersion: 2 64 | human: [] 65 | skeleton: [] 66 | armTwist: 0.5 67 | foreArmTwist: 0.5 68 | upperLegTwist: 0.5 69 | legTwist: 0.5 70 | armStretch: 0.05 71 | legStretch: 0.05 72 | feetSpacing: 0 73 | rootMotionBoneName: 74 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 75 | hasTranslationDoF: 0 76 | hasExtraRoot: 0 77 | skeletonHasParents: 1 78 | lastHumanDescriptionAvatarSource: {instanceID: 0} 79 | animationType: 2 80 | humanoidOversampling: 1 81 | additionalBone: 0 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/Models/HexMountain.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/HexMountain.blend -------------------------------------------------------------------------------- /Assets/Models/HexMountain.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 406398c8c03649e45883ffe9e4b93e02 3 | timeCreated: 1493917081 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: Cylinder 13 | 7400000: Default Take 14 | 9500000: //RootNode 15 | materials: 16 | importMaterials: 1 17 | materialName: 0 18 | materialSearch: 1 19 | animations: 20 | legacyGenerateAnimations: 4 21 | bakeSimulation: 0 22 | resampleCurves: 1 23 | optimizeGameObjects: 0 24 | motionNodeName: 25 | rigImportErrors: 26 | rigImportWarnings: 27 | animationImportErrors: 28 | animationImportWarnings: 29 | animationRetargetingWarnings: 30 | animationDoRetargetingWarnings: 0 31 | animationCompression: 1 32 | animationRotationError: 0.5 33 | animationPositionError: 0.5 34 | animationScaleError: 0.5 35 | animationWrapMode: 0 36 | extraExposedTransformPaths: [] 37 | clipAnimations: [] 38 | isReadable: 1 39 | meshes: 40 | lODScreenPercentages: [] 41 | globalScale: 1 42 | meshCompression: 0 43 | addColliders: 0 44 | importBlendShapes: 1 45 | swapUVChannels: 0 46 | generateSecondaryUV: 0 47 | useFileUnits: 1 48 | optimizeMeshForGPU: 1 49 | keepQuads: 0 50 | weldVertices: 1 51 | secondaryUVAngleDistortion: 8 52 | secondaryUVAreaDistortion: 15.000001 53 | secondaryUVHardAngle: 88 54 | secondaryUVPackMargin: 4 55 | useFileScale: 1 56 | tangentSpace: 57 | normalSmoothAngle: 60 58 | normalImportMode: 0 59 | tangentImportMode: 3 60 | importAnimation: 1 61 | copyAvatar: 0 62 | humanDescription: 63 | serializedVersion: 2 64 | human: [] 65 | skeleton: [] 66 | armTwist: 0.5 67 | foreArmTwist: 0.5 68 | upperLegTwist: 0.5 69 | legTwist: 0.5 70 | armStretch: 0.05 71 | legStretch: 0.05 72 | feetSpacing: 0 73 | rootMotionBoneName: 74 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 75 | hasTranslationDoF: 0 76 | hasExtraRoot: 0 77 | skeletonHasParents: 1 78 | lastHumanDescriptionAvatarSource: {instanceID: 0} 79 | animationType: 2 80 | humanoidOversampling: 1 81 | additionalBone: 0 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/Models/HexMountain.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/HexMountain.blend1 -------------------------------------------------------------------------------- /Assets/Models/HexMountain.blend1.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b25a4ccb1c233c148a7cdec105730b73 3 | timeCreated: 1496168517 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/HexSelection.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/HexSelection.blend -------------------------------------------------------------------------------- /Assets/Models/HexSelection.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1dc3c1e3f9cb664b901edc78fd44553 3 | timeCreated: 1493917081 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: Cylinder 13 | 7400000: Default Take 14 | 9500000: //RootNode 15 | materials: 16 | importMaterials: 1 17 | materialName: 0 18 | materialSearch: 1 19 | animations: 20 | legacyGenerateAnimations: 4 21 | bakeSimulation: 0 22 | resampleCurves: 1 23 | optimizeGameObjects: 0 24 | motionNodeName: 25 | rigImportErrors: 26 | rigImportWarnings: 27 | animationImportErrors: 28 | animationImportWarnings: 29 | animationRetargetingWarnings: 30 | animationDoRetargetingWarnings: 0 31 | animationCompression: 1 32 | animationRotationError: 0.5 33 | animationPositionError: 0.5 34 | animationScaleError: 0.5 35 | animationWrapMode: 0 36 | extraExposedTransformPaths: [] 37 | clipAnimations: [] 38 | isReadable: 1 39 | meshes: 40 | lODScreenPercentages: [] 41 | globalScale: 1 42 | meshCompression: 0 43 | addColliders: 0 44 | importBlendShapes: 1 45 | swapUVChannels: 0 46 | generateSecondaryUV: 0 47 | useFileUnits: 1 48 | optimizeMeshForGPU: 1 49 | keepQuads: 0 50 | weldVertices: 1 51 | secondaryUVAngleDistortion: 8 52 | secondaryUVAreaDistortion: 15.000001 53 | secondaryUVHardAngle: 88 54 | secondaryUVPackMargin: 4 55 | useFileScale: 1 56 | tangentSpace: 57 | normalSmoothAngle: 60 58 | normalImportMode: 0 59 | tangentImportMode: 3 60 | importAnimation: 1 61 | copyAvatar: 0 62 | humanDescription: 63 | serializedVersion: 2 64 | human: [] 65 | skeleton: [] 66 | armTwist: 0.5 67 | foreArmTwist: 0.5 68 | upperLegTwist: 0.5 69 | legTwist: 0.5 70 | armStretch: 0.05 71 | legStretch: 0.05 72 | feetSpacing: 0 73 | rootMotionBoneName: 74 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 75 | hasTranslationDoF: 0 76 | hasExtraRoot: 0 77 | skeletonHasParents: 1 78 | lastHumanDescriptionAvatarSource: {instanceID: 0} 79 | animationType: 2 80 | humanoidOversampling: 1 81 | additionalBone: 0 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/Models/HexSelection.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/HexSelection.blend1 -------------------------------------------------------------------------------- /Assets/Models/HexSelection.blend1.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02eb943cb6364a442a687975ba41abb3 3 | timeCreated: 1504975247 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4209b4ab7ddf1bc41964bd130856798c 3 | folderAsset: yes 4 | timeCreated: 1493917081 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/Materials/unnamed.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/Materials/unnamed.mat -------------------------------------------------------------------------------- /Assets/Models/Materials/unnamed.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b08797c1bc6dfc54eb325db54cad9453 3 | timeCreated: 1493917081 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b14795f106ef6c4dafa01ffa71be98b 3 | folderAsset: yes 4 | timeCreated: 1496154192 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9bcb129ac0d73742a7f5790554b50c3 3 | folderAsset: yes 4 | timeCreated: 1496154205 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/BODY_normal_002.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/BODY_normal_002.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/BODY_normal_002.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e354c281eac8014da2eca36153d336e 3 | timeCreated: 1496154205 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Dwarf Leather.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/Dwarf Leather.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Dwarf Leather.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdc87ffd5dd31d94a8e5d9a5511bdf6e 3 | timeCreated: 1496155201 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Eye_brown.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/Eye_brown.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Eye_brown.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8990bbd0db69a7b41a48675c9d72820c 3 | timeCreated: 1496154209 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Hair12Main2k.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/Hair12Main2k.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Hair12Main2k.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cb4d43e933ccad4abdb23bb2ab85ac5 3 | timeCreated: 1496154209 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/HorseMain2k00.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/HorseMain2k00.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/HorseMain2k00.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd820261e26e92748909bf90db0acc98 3 | timeCreated: 1496154209 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Material.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/Material.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dae472c3853507b40b278b66e6a01f94 3 | timeCreated: 1496154205 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Metal Armor.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/Metal Armor.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/Metal Armor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0620cae4dad95c41b90c52df057e2ab 3 | timeCreated: 1496154701 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/b_color.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/b_color.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/b_color.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9627768e073abe141b9f19c46b2d6dbf 3 | timeCreated: 1496154205 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/cloth_mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/cloth_mat.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/cloth_mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4159cd15fa7a2b447bc474ade9cfb607 3 | timeCreated: 1496154205 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/dwarf_leather_belt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/dwarf_leather_belt.png -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/dwarf_leather_belt.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dca72d76d239c15428cefb68789f1779 3 | timeCreated: 1496155182 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/dwarf_metal_armor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/dwarf_metal_armor.png -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/dwarf_metal_armor.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b17ac943d18b1341af9e5206e77bd24 3 | timeCreated: 1496154662 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/dwarf_skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/dwarf_skin.png -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/dwarf_skin.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86f00b289ea1ca64aa6592a513759d28 3 | timeCreated: 1496154663 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/dwarf_tunic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/dwarf_tunic.png -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/dwarf_tunic.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ff5eccb27ae9b8468c7376bdad72d0e 3 | timeCreated: 1496154663 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/untitled.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/Materials/untitled.mat -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/Materials/untitled.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 44e66ca119cabae448618bd3b22f54cd 3 | timeCreated: 1496154205 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/SOURCE.txt: -------------------------------------------------------------------------------- 1 | "Fixed Dwarf" 2 | CC-BY 3.0 3 | Work by: thecubber and MrBeast 4 | https://opengameart.org/content/dwarf-fixed 5 | 6 | "Rigged Horse" 7 | CC0 8 | Work by: Lyndon Daniels 9 | https://opengameart.org/content/rigged-horse 10 | 11 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/SOURCE.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f6129c409c16764bb8308e0504ff906 3 | timeCreated: 1496154192 4 | licenseType: Free 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/fixed.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/fixed.blend -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/fixed.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57df6fffe87cf5a47857a4f0fa74b83f 3 | timeCreated: 1496154205 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: a_1_L 9 | 100002: a_1_R 10 | 100004: a_2_L 11 | 100006: a_2_R 12 | 100008: a_3 13 | 100010: a_3_ct 14 | 100012: a_4_L 15 | 100014: a_4_R 16 | 100016: armor 17 | 100018: armor_1_ct_L 18 | 100020: armor_1_ct_R 19 | 100022: armor_2_ct_L 20 | 100024: armor_2_ct_R 21 | 100026: armor_4_ct_L 22 | 100028: armor_4_ct_R 23 | 100030: body 24 | 100032: body_0 25 | 100034: body_cr 26 | 100036: cloth 27 | 100038: Control_armature 28 | 100040: Deform_armature 29 | 100042: elbow_target_L 30 | 100044: elbow_target_R 31 | 100046: finger_index_01_cr_L 32 | 100048: finger_index_01_cr_R 33 | 100050: finger_index_01_L 34 | 100052: finger_index_01_R 35 | 100054: finger_index_02_cr_L 36 | 100056: finger_index_02_cr_R 37 | 100058: finger_index_02_L 38 | 100060: finger_index_02_R 39 | 100062: finger_index_03_cr_L 40 | 100064: finger_index_03_cr_R 41 | 100066: finger_index_03_L 42 | 100068: finger_index_03_R 43 | 100070: finger_index_control_L 44 | 100072: finger_index_control_R 45 | 100074: finger_index_target1_L 46 | 100076: finger_index_target1_R 47 | 100078: finger_index_target2_L 48 | 100080: finger_index_target2_R 49 | 100082: finger_middle_01_cr_L 50 | 100084: finger_middle_01_cr_R 51 | 100086: finger_middle_01_L 52 | 100088: finger_middle_01_R 53 | 100090: finger_middle_02_cr_L 54 | 100092: finger_middle_02_cr_R 55 | 100094: finger_middle_02_L 56 | 100096: finger_middle_02_R 57 | 100098: finger_middle_03_cr_L 58 | 100100: finger_middle_03_cr_R 59 | 100102: finger_middle_03_L 60 | 100104: finger_middle_03_R 61 | 100106: finger_middle_control_L 62 | 100108: finger_middle_control_R 63 | 100110: finger_middle_target1_L 64 | 100112: finger_middle_target1_R 65 | 100114: finger_middle_target2_L 66 | 100116: finger_middle_target2_R 67 | 100118: finger_pinky_01_cr_L 68 | 100120: finger_pinky_01_cr_R 69 | 100122: finger_pinky_01_L 70 | 100124: finger_pinky_01_R 71 | 100126: finger_pinky_02_cr_L 72 | 100128: finger_pinky_02_cr_R 73 | 100130: finger_pinky_02_L 74 | 100132: finger_pinky_02_R 75 | 100134: finger_pinky_03_cr_L 76 | 100136: finger_pinky_03_cr_R 77 | 100138: finger_pinky_03_L 78 | 100140: finger_pinky_03_R 79 | 100142: finger_pinky_control_L 80 | 100144: finger_pinky_control_R 81 | 100146: finger_pinky_target1_L 82 | 100148: finger_pinky_target1_R 83 | 100150: finger_pinky_target2_L 84 | 100152: finger_pinky_target2_R 85 | 100154: finger_ring_01_cr_L 86 | 100156: finger_ring_01_cr_R 87 | 100158: finger_ring_01_L 88 | 100160: finger_ring_01_R 89 | 100162: finger_ring_02_cr_L 90 | 100164: finger_ring_02_cr_R 91 | 100166: finger_ring_02_L 92 | 100168: finger_ring_02_R 93 | 100170: finger_ring_03_cr_L 94 | 100172: finger_ring_03_cr_R 95 | 100174: finger_ring_03_L 96 | 100176: finger_ring_03_R 97 | 100178: finger_ring_control_L 98 | 100180: finger_ring_control_R 99 | 100182: finger_ring_target1_L 100 | 100184: finger_ring_target1_R 101 | 100186: finger_ring_target2_L 102 | 100188: finger_ring_target2_R 103 | 100190: fist_L 104 | 100192: fist_R 105 | 100194: //RootNode 106 | 100196: foot_control_L 107 | 100198: foot_control_R 108 | 100200: foot_roll_L 109 | 100202: foot_roll_R 110 | 100204: forearm_cr_L 111 | 100206: forearm_cr_R 112 | 100208: forearm_L 113 | 100210: forearm_R 114 | 100212: hand_cr_L 115 | 100214: hand_cr_R 116 | 100216: hand_L 117 | 100218: hand_R 118 | 100220: head 119 | 100222: head_cr 120 | 100224: head_target 121 | 100226: heel_L 122 | 100228: heel_R 123 | 100230: knee_target_L 124 | 100232: knee_target_R 125 | 100234: leather 126 | 100236: leg_target_L 127 | 100238: leg_target_R 128 | 100240: neck 129 | 100242: neck_cr 130 | 100244: pelvis 131 | 100246: pelvis_cr 132 | 100248: Plane 133 | 100250: shin_cr_L 134 | 100252: shin_cr_R 135 | 100254: shin_L 136 | 100256: shin_R 137 | 100258: shoulder_cr_L 138 | 100260: shoulder_cr_R 139 | 100262: shoulder_L 140 | 100264: shoulder_R 141 | 100266: spine_01 142 | 100268: spine_02 143 | 100270: spine_03 144 | 100272: spine_cr_01 145 | 100274: spine_cr_02 146 | 100276: spine_cr_03 147 | 100278: spine_target 148 | 100280: tarsal_cr_L 149 | 100282: tarsal_cr_R 150 | 100284: tarsal_L 151 | 100286: tarsal_R 152 | 100288: tarsal_target_L 153 | 100290: tarsal_target_R 154 | 100292: thigh_cr_L 155 | 100294: thigh_cr_R 156 | 100296: thigh_L 157 | 100298: thigh_R 158 | 100300: thumb_01_cr_L 159 | 100302: thumb_01_cr_R 160 | 100304: thumb_01_L 161 | 100306: thumb_01_R 162 | 100308: thumb_02_cr_L 163 | 100310: thumb_02_cr_R 164 | 100312: thumb_02_L 165 | 100314: thumb_02_R 166 | 100316: thumb_03_cr_L 167 | 100318: thumb_03_cr_R 168 | 100320: thumb_03_L 169 | 100322: thumb_03_R 170 | 100324: thumb_control_L 171 | 100326: thumb_control_R 172 | 100328: thumb_target1_L 173 | 100330: thumb_target1_R 174 | 100332: thumb_target2_L 175 | 100334: thumb_target2_R 176 | 100336: toe_cr_L 177 | 100338: toe_cr_R 178 | 100340: toe_L 179 | 100342: toe_R 180 | 100344: toe_rotate_L 181 | 100346: toe_rotate_R 182 | 100348: toe_target_L 183 | 100350: toe_target_R 184 | 100352: toe_tip_L 185 | 100354: toe_tip_R 186 | 100356: upper_arm_cr_L 187 | 100358: upper_arm_cr_R 188 | 100360: upper_arm_L 189 | 100362: upper_arm_R 190 | 400000: a_1_L 191 | 400002: a_1_R 192 | 400004: a_2_L 193 | 400006: a_2_R 194 | 400008: a_3 195 | 400010: a_3_ct 196 | 400012: a_4_L 197 | 400014: a_4_R 198 | 400016: armor 199 | 400018: armor_1_ct_L 200 | 400020: armor_1_ct_R 201 | 400022: armor_2_ct_L 202 | 400024: armor_2_ct_R 203 | 400026: armor_4_ct_L 204 | 400028: armor_4_ct_R 205 | 400030: body 206 | 400032: body_0 207 | 400034: body_cr 208 | 400036: cloth 209 | 400038: Control_armature 210 | 400040: Deform_armature 211 | 400042: elbow_target_L 212 | 400044: elbow_target_R 213 | 400046: finger_index_01_cr_L 214 | 400048: finger_index_01_cr_R 215 | 400050: finger_index_01_L 216 | 400052: finger_index_01_R 217 | 400054: finger_index_02_cr_L 218 | 400056: finger_index_02_cr_R 219 | 400058: finger_index_02_L 220 | 400060: finger_index_02_R 221 | 400062: finger_index_03_cr_L 222 | 400064: finger_index_03_cr_R 223 | 400066: finger_index_03_L 224 | 400068: finger_index_03_R 225 | 400070: finger_index_control_L 226 | 400072: finger_index_control_R 227 | 400074: finger_index_target1_L 228 | 400076: finger_index_target1_R 229 | 400078: finger_index_target2_L 230 | 400080: finger_index_target2_R 231 | 400082: finger_middle_01_cr_L 232 | 400084: finger_middle_01_cr_R 233 | 400086: finger_middle_01_L 234 | 400088: finger_middle_01_R 235 | 400090: finger_middle_02_cr_L 236 | 400092: finger_middle_02_cr_R 237 | 400094: finger_middle_02_L 238 | 400096: finger_middle_02_R 239 | 400098: finger_middle_03_cr_L 240 | 400100: finger_middle_03_cr_R 241 | 400102: finger_middle_03_L 242 | 400104: finger_middle_03_R 243 | 400106: finger_middle_control_L 244 | 400108: finger_middle_control_R 245 | 400110: finger_middle_target1_L 246 | 400112: finger_middle_target1_R 247 | 400114: finger_middle_target2_L 248 | 400116: finger_middle_target2_R 249 | 400118: finger_pinky_01_cr_L 250 | 400120: finger_pinky_01_cr_R 251 | 400122: finger_pinky_01_L 252 | 400124: finger_pinky_01_R 253 | 400126: finger_pinky_02_cr_L 254 | 400128: finger_pinky_02_cr_R 255 | 400130: finger_pinky_02_L 256 | 400132: finger_pinky_02_R 257 | 400134: finger_pinky_03_cr_L 258 | 400136: finger_pinky_03_cr_R 259 | 400138: finger_pinky_03_L 260 | 400140: finger_pinky_03_R 261 | 400142: finger_pinky_control_L 262 | 400144: finger_pinky_control_R 263 | 400146: finger_pinky_target1_L 264 | 400148: finger_pinky_target1_R 265 | 400150: finger_pinky_target2_L 266 | 400152: finger_pinky_target2_R 267 | 400154: finger_ring_01_cr_L 268 | 400156: finger_ring_01_cr_R 269 | 400158: finger_ring_01_L 270 | 400160: finger_ring_01_R 271 | 400162: finger_ring_02_cr_L 272 | 400164: finger_ring_02_cr_R 273 | 400166: finger_ring_02_L 274 | 400168: finger_ring_02_R 275 | 400170: finger_ring_03_cr_L 276 | 400172: finger_ring_03_cr_R 277 | 400174: finger_ring_03_L 278 | 400176: finger_ring_03_R 279 | 400178: finger_ring_control_L 280 | 400180: finger_ring_control_R 281 | 400182: finger_ring_target1_L 282 | 400184: finger_ring_target1_R 283 | 400186: finger_ring_target2_L 284 | 400188: finger_ring_target2_R 285 | 400190: fist_L 286 | 400192: fist_R 287 | 400194: //RootNode 288 | 400196: foot_control_L 289 | 400198: foot_control_R 290 | 400200: foot_roll_L 291 | 400202: foot_roll_R 292 | 400204: forearm_cr_L 293 | 400206: forearm_cr_R 294 | 400208: forearm_L 295 | 400210: forearm_R 296 | 400212: hand_cr_L 297 | 400214: hand_cr_R 298 | 400216: hand_L 299 | 400218: hand_R 300 | 400220: head 301 | 400222: head_cr 302 | 400224: head_target 303 | 400226: heel_L 304 | 400228: heel_R 305 | 400230: knee_target_L 306 | 400232: knee_target_R 307 | 400234: leather 308 | 400236: leg_target_L 309 | 400238: leg_target_R 310 | 400240: neck 311 | 400242: neck_cr 312 | 400244: pelvis 313 | 400246: pelvis_cr 314 | 400248: Plane 315 | 400250: shin_cr_L 316 | 400252: shin_cr_R 317 | 400254: shin_L 318 | 400256: shin_R 319 | 400258: shoulder_cr_L 320 | 400260: shoulder_cr_R 321 | 400262: shoulder_L 322 | 400264: shoulder_R 323 | 400266: spine_01 324 | 400268: spine_02 325 | 400270: spine_03 326 | 400272: spine_cr_01 327 | 400274: spine_cr_02 328 | 400276: spine_cr_03 329 | 400278: spine_target 330 | 400280: tarsal_cr_L 331 | 400282: tarsal_cr_R 332 | 400284: tarsal_L 333 | 400286: tarsal_R 334 | 400288: tarsal_target_L 335 | 400290: tarsal_target_R 336 | 400292: thigh_cr_L 337 | 400294: thigh_cr_R 338 | 400296: thigh_L 339 | 400298: thigh_R 340 | 400300: thumb_01_cr_L 341 | 400302: thumb_01_cr_R 342 | 400304: thumb_01_L 343 | 400306: thumb_01_R 344 | 400308: thumb_02_cr_L 345 | 400310: thumb_02_cr_R 346 | 400312: thumb_02_L 347 | 400314: thumb_02_R 348 | 400316: thumb_03_cr_L 349 | 400318: thumb_03_cr_R 350 | 400320: thumb_03_L 351 | 400322: thumb_03_R 352 | 400324: thumb_control_L 353 | 400326: thumb_control_R 354 | 400328: thumb_target1_L 355 | 400330: thumb_target1_R 356 | 400332: thumb_target2_L 357 | 400334: thumb_target2_R 358 | 400336: toe_cr_L 359 | 400338: toe_cr_R 360 | 400340: toe_L 361 | 400342: toe_R 362 | 400344: toe_rotate_L 363 | 400346: toe_rotate_R 364 | 400348: toe_target_L 365 | 400350: toe_target_R 366 | 400352: toe_tip_L 367 | 400354: toe_tip_R 368 | 400356: upper_arm_cr_L 369 | 400358: upper_arm_cr_R 370 | 400360: upper_arm_L 371 | 400362: upper_arm_R 372 | 2300000: Plane 373 | 3300000: Plane 374 | 4300000: Plane 375 | 4300002: armor 376 | 4300004: leather 377 | 4300006: body 378 | 4300008: cloth 379 | 7400000: Default Take 380 | 9500000: //RootNode 381 | 13700000: armor 382 | 13700002: body 383 | 13700004: cloth 384 | 13700006: leather 385 | materials: 386 | importMaterials: 1 387 | materialName: 0 388 | materialSearch: 1 389 | animations: 390 | legacyGenerateAnimations: 4 391 | bakeSimulation: 0 392 | resampleCurves: 1 393 | optimizeGameObjects: 0 394 | motionNodeName: 395 | rigImportErrors: 396 | rigImportWarnings: 397 | animationImportErrors: 398 | animationImportWarnings: 399 | animationRetargetingWarnings: 400 | animationDoRetargetingWarnings: 0 401 | animationCompression: 1 402 | animationRotationError: 0.5 403 | animationPositionError: 0.5 404 | animationScaleError: 0.5 405 | animationWrapMode: 0 406 | extraExposedTransformPaths: [] 407 | clipAnimations: [] 408 | isReadable: 1 409 | meshes: 410 | lODScreenPercentages: [] 411 | globalScale: 1 412 | meshCompression: 0 413 | addColliders: 0 414 | importBlendShapes: 1 415 | swapUVChannels: 0 416 | generateSecondaryUV: 0 417 | useFileUnits: 1 418 | optimizeMeshForGPU: 1 419 | keepQuads: 0 420 | weldVertices: 1 421 | secondaryUVAngleDistortion: 8 422 | secondaryUVAreaDistortion: 15.000001 423 | secondaryUVHardAngle: 88 424 | secondaryUVPackMargin: 4 425 | useFileScale: 1 426 | tangentSpace: 427 | normalSmoothAngle: 60 428 | normalImportMode: 0 429 | tangentImportMode: 3 430 | importAnimation: 1 431 | copyAvatar: 0 432 | humanDescription: 433 | serializedVersion: 2 434 | human: [] 435 | skeleton: [] 436 | armTwist: 0.5 437 | foreArmTwist: 0.5 438 | upperLegTwist: 0.5 439 | legTwist: 0.5 440 | armStretch: 0.05 441 | legStretch: 0.05 442 | feetSpacing: 0 443 | rootMotionBoneName: 444 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 445 | hasTranslationDoF: 0 446 | hasExtraRoot: 0 447 | skeletonHasParents: 1 448 | lastHumanDescriptionAvatarSource: {instanceID: 0} 449 | animationType: 2 450 | humanoidOversampling: 1 451 | additionalBone: 0 452 | userData: 453 | assetBundleName: 454 | assetBundleVariant: 455 | -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/riggedHorse.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Models/OpenGameArt/riggedHorse.blend -------------------------------------------------------------------------------- /Assets/Models/OpenGameArt/riggedHorse.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6671ca2e255c3384b85bc18de7c066cd 3 | timeCreated: 1496154209 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: Armature 9 | 100002: BezierCurve 10 | 100004: BezierCurve_005 11 | 100006: Bone 12 | 100008: Bone_001 13 | 100010: Bone_001_L 14 | 100012: Bone_001_R 15 | 100014: Bone_002 16 | 100016: Bone_003 17 | 100018: Bone_004 18 | 100020: Bone_L 19 | 100022: Bone_L_001 20 | 100024: Bone_L_002 21 | 100026: Bone_L_003 22 | 100028: Bone_L_004 23 | 100030: Bone_L_005 24 | 100032: Bone_R 25 | 100034: Bone_R_001 26 | 100036: Bone_R_002 27 | 100038: Bone_R_003 28 | 100040: Bone_R_004 29 | 100042: Bone_R_005 30 | 100044: Plane 31 | 100046: //RootNode 32 | 100048: Sphere 33 | 100050: Sphere_002 34 | 400000: Armature 35 | 400002: BezierCurve 36 | 400004: BezierCurve_005 37 | 400006: Bone 38 | 400008: Bone_001 39 | 400010: Bone_001_L 40 | 400012: Bone_001_R 41 | 400014: Bone_002 42 | 400016: Bone_003 43 | 400018: Bone_004 44 | 400020: Bone_L 45 | 400022: Bone_L_001 46 | 400024: Bone_L_002 47 | 400026: Bone_L_003 48 | 400028: Bone_L_004 49 | 400030: Bone_L_005 50 | 400032: Bone_R 51 | 400034: Bone_R_001 52 | 400036: Bone_R_002 53 | 400038: Bone_R_003 54 | 400040: Bone_R_004 55 | 400042: Bone_R_005 56 | 400044: Plane 57 | 400046: //RootNode 58 | 400048: Sphere 59 | 400050: Sphere_002 60 | 2300000: BezierCurve 61 | 2300002: BezierCurve_005 62 | 2300004: Sphere 63 | 2300006: Sphere_002 64 | 3300000: BezierCurve 65 | 3300002: BezierCurve_005 66 | 3300004: Sphere 67 | 3300006: Sphere_002 68 | 4300000: Plane 69 | 4300002: Sphere_002 70 | 4300004: BezierCurve_005 71 | 4300006: BezierCurve 72 | 4300008: Sphere 73 | 7400000: Default Take 74 | 9500000: //RootNode 75 | 13700000: Plane 76 | materials: 77 | importMaterials: 1 78 | materialName: 0 79 | materialSearch: 1 80 | animations: 81 | legacyGenerateAnimations: 4 82 | bakeSimulation: 0 83 | resampleCurves: 1 84 | optimizeGameObjects: 0 85 | motionNodeName: 86 | rigImportErrors: 87 | rigImportWarnings: 88 | animationImportErrors: 89 | animationImportWarnings: 90 | animationRetargetingWarnings: 91 | animationDoRetargetingWarnings: 0 92 | animationCompression: 1 93 | animationRotationError: 0.5 94 | animationPositionError: 0.5 95 | animationScaleError: 0.5 96 | animationWrapMode: 0 97 | extraExposedTransformPaths: [] 98 | clipAnimations: [] 99 | isReadable: 1 100 | meshes: 101 | lODScreenPercentages: [] 102 | globalScale: 1 103 | meshCompression: 0 104 | addColliders: 0 105 | importBlendShapes: 1 106 | swapUVChannels: 0 107 | generateSecondaryUV: 0 108 | useFileUnits: 1 109 | optimizeMeshForGPU: 1 110 | keepQuads: 0 111 | weldVertices: 1 112 | secondaryUVAngleDistortion: 8 113 | secondaryUVAreaDistortion: 15.000001 114 | secondaryUVHardAngle: 88 115 | secondaryUVPackMargin: 4 116 | useFileScale: 1 117 | tangentSpace: 118 | normalSmoothAngle: 60 119 | normalImportMode: 0 120 | tangentImportMode: 3 121 | importAnimation: 1 122 | copyAvatar: 0 123 | humanDescription: 124 | serializedVersion: 2 125 | human: [] 126 | skeleton: [] 127 | armTwist: 0.5 128 | foreArmTwist: 0.5 129 | upperLegTwist: 0.5 130 | legTwist: 0.5 131 | armStretch: 0.05 132 | legStretch: 0.05 133 | feetSpacing: 0 134 | rootMotionBoneName: 135 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 136 | hasTranslationDoF: 0 137 | hasExtraRoot: 0 138 | skeletonHasParents: 1 139 | lastHumanDescriptionAvatarSource: {instanceID: 0} 140 | animationType: 2 141 | humanoidOversampling: 1 142 | additionalBone: 0 143 | userData: 144 | assetBundleName: 145 | assetBundleVariant: 146 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bc078c339d350e41a67f980af86c875 3 | folderAsset: yes 4 | timeCreated: 1493919321 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/City01.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Prefabs/City01.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/City01.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc4b6f263ddd5f449a90c6f0ec9cea66 3 | timeCreated: 1503159130 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/Dwarf.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Prefabs/Dwarf.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Dwarf.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86cdf47147f6a27479cf9fc699c6ae5c 3 | timeCreated: 1496154791 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/ForestPrefab.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Prefabs/ForestPrefab.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/ForestPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 831556d6b101ea344861eed3f8555525 3 | timeCreated: 1496169837 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/HexPrefab.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Prefabs/HexPrefab.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/HexPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 688ba16db0c092f469742f3cfdface2e 3 | timeCreated: 1493919522 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81bbc8ce7f29a57418da396384329585 3 | folderAsset: yes 4 | timeCreated: 1503164816 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/UI/BuildableItem.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Prefabs/UI/BuildableItem.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/UI/BuildableItem.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1f8f9b35d0644d45bdccbb1d17bb0ec 3 | timeCreated: 1506789634 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/UI/CityNamePlate.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Prefabs/UI/CityNamePlate.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/UI/CityNamePlate.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1399860ff78b854eb55ced7300565bd 3 | timeCreated: 1503164819 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/Unit.Dwarf.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/Prefabs/Unit.Dwarf.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Unit.Dwarf.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3a3811cd21e6a64a9483be571975c26 3 | timeCreated: 1496942582 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/QPath.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6efa2130c555e674cb654dcc084594d5 3 | folderAsset: yes 4 | timeCreated: 1498320950 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/QPath/IQPathTile.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | 6 | namespace QPath 7 | { 8 | 9 | public interface IQPathTile { 10 | 11 | IQPathTile[] GetNeighbours(); 12 | 13 | float AggregateCostToEnter( float costSoFar, IQPathTile sourceTile, IQPathUnit theUnit ); 14 | 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /Assets/QPath/IQPathTile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23e142a33e1195b4cbcad3c96f47b584 3 | timeCreated: 1498321696 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/QPath/IQPathUnit.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace QPath 6 | { 7 | 8 | public interface IQPathUnit { 9 | 10 | float CostToEnterHex( IQPathTile sourceTile, IQPathTile destinationTile ); 11 | 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Assets/QPath/IQPathUnit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a796f09420c880498500f3d7e002b73 3 | timeCreated: 1498321704 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/QPath/IQPathWorld.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace QPath 6 | { 7 | 8 | public interface IQPathWorld { 9 | //IQPathTile GetTileAt(int x, int y); 10 | //IQPathTile[] GetAllTiles(); 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/QPath/IQPathWorld.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a22693d09a744e54994b42c894efdaa7 3 | timeCreated: 1498322167 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/QPath/PathfindingPriorityQueue.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // ==================================================== 3 | // Project Porcupine Copyright(C) 2016 Team Porcupine 4 | // This program comes with ABSOLUTELY NO WARRANTY; This is free software, 5 | // and you are welcome to redistribute it under certain conditions; See 6 | // file LICENSE, which is part of this source code package, for details. 7 | // ==================================================== 8 | #endregion 9 | 10 | using UnityEngine; 11 | using System.Collections.Generic; 12 | using Priority_Queue; 13 | 14 | /// 15 | /// Wraps the FastPriorityQueue class so that it's both easy-to-use, 16 | /// and faster than SimplePriorityQueue (which sports an O(n) Contains 17 | /// and an O(n) UpdatePriority -- not exactly ideal). 18 | /// 19 | public class PathfindingPriorityQueue 20 | { 21 | /// 22 | /// The underlying FastPriorityQueue instance. 23 | /// 24 | protected FastPriorityQueue underlyingQueue; 25 | 26 | /// 27 | /// The map between data and WrappedNodes. 28 | /// Used to make operations like Contains and UpdatePriority more efficient. 29 | /// 30 | protected Dictionary mapDataToWrappedNode; 31 | 32 | /// 33 | /// Initializes a new instance of the class. 34 | /// 35 | /// The starting size. 36 | public PathfindingPriorityQueue(int startingSize = 10) 37 | { 38 | underlyingQueue = new FastPriorityQueue(startingSize); 39 | mapDataToWrappedNode = new Dictionary(); 40 | } 41 | 42 | /// 43 | /// Returns the number of items in the queue. 44 | /// 45 | /// The count. 46 | public int Count 47 | { 48 | get 49 | { 50 | return underlyingQueue.Count; 51 | } 52 | } 53 | 54 | /// 55 | /// Checks whether the PQ contains the specified data. 56 | /// Uses a Dictionary for lookup, so it should only take O(1). 57 | /// 58 | /// Datakey to check. 59 | public bool Contains(T data) 60 | { 61 | return mapDataToWrappedNode.ContainsKey(data); 62 | } 63 | 64 | /// 65 | /// Enqueue the specified data and priority. 66 | /// If the data already exists in the queue, it updates the priority instead. 67 | /// Should take O(log n) -- O(1) amortized for the resizing, and O(log n) for the insertion. 68 | /// 69 | /// The data to be enqueued. 70 | /// The priority of the data. 71 | public void Enqueue(T data, float priority) 72 | { 73 | if (mapDataToWrappedNode.ContainsKey(data)) 74 | { 75 | Debug.LogError("Priority Queue can't re-enqueue a node that's already enqueued."); 76 | return; 77 | } 78 | 79 | if (underlyingQueue.Count == underlyingQueue.MaxSize) 80 | { 81 | underlyingQueue.Resize((2 * underlyingQueue.MaxSize) + 1); 82 | } 83 | 84 | WrappedNode newNode = new WrappedNode(data); 85 | underlyingQueue.Enqueue(newNode, priority); 86 | mapDataToWrappedNode[data] = newNode; 87 | } 88 | 89 | /// 90 | /// Updates the priority associated with the given data. 91 | /// 92 | /// The data whose priority needs updating. 93 | /// The new priority value. 94 | public void UpdatePriority(T data, float priority) 95 | { 96 | WrappedNode node = mapDataToWrappedNode[data]; 97 | underlyingQueue.UpdatePriority(node, priority); 98 | } 99 | 100 | /// 101 | /// Enqueues or updates data. 102 | /// 103 | /// Datakey to enqueue or update.. 104 | /// New priority level. 105 | public void EnqueueOrUpdate(T data, float priority) 106 | { 107 | if (mapDataToWrappedNode.ContainsKey(data)) 108 | { 109 | UpdatePriority(data, priority); 110 | } 111 | else 112 | { 113 | Enqueue(data, priority); 114 | } 115 | } 116 | 117 | /// 118 | /// Pops the item with the lowest priority off of the queue. 119 | /// 120 | public T Dequeue() 121 | { 122 | WrappedNode popped = underlyingQueue.Dequeue(); 123 | mapDataToWrappedNode.Remove(popped.Data); 124 | return popped.Data; 125 | } 126 | 127 | /// 128 | /// A version of a PriorityQueueNode that contains a reference to data. 129 | /// 130 | protected class WrappedNode : FastPriorityQueueNode 131 | { 132 | /// 133 | /// The data that this WrappedNode represents in the queue. 134 | /// 135 | public readonly T Data; 136 | 137 | /// 138 | /// Initializes a new instance of the class. 139 | /// 140 | /// The data that this WrappedNode represents in the queue. 141 | public WrappedNode(T data) 142 | { 143 | this.Data = data; 144 | } 145 | } 146 | } -------------------------------------------------------------------------------- /Assets/QPath/PathfindingPriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a5584bc22e3e6849829d2b48bdeabe8 3 | timeCreated: 1498323794 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/QPath/Priority Queue.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e15565e7693a3ef4fa615cb37b3aea76 3 | folderAsset: yes 4 | timeCreated: 1498323812 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/FastPriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 658b88697abc33d4fba53252e4477070 3 | timeCreated: 1498323812 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/QPath/Priority Queue/FastPriorityQueueNode.cs: -------------------------------------------------------------------------------- 1 | namespace Priority_Queue 2 | { 3 | public class FastPriorityQueueNode 4 | { 5 | /// 6 | /// The Priority to insert this node at. Must be set BEFORE adding a node to the queue (ideally just once, in the node's constructor). 7 | /// Should not be manually edited once the node has been enqueued - use queue.UpdatePriority() instead 8 | /// 9 | public float Priority { get; protected internal set; } 10 | 11 | /// 12 | /// Represents the current position in the queue 13 | /// 14 | public int QueueIndex { get; internal set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/FastPriorityQueueNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3378e5c11101b524c85cb08cfc92e494 3 | timeCreated: 1498323812 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/QPath/Priority Queue/GenericPriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdf5657366ac8ab4599011d7bfae6077 3 | timeCreated: 1498323812 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/QPath/Priority Queue/GenericPriorityQueueNode.cs: -------------------------------------------------------------------------------- 1 | namespace Priority_Queue 2 | { 3 | public class GenericPriorityQueueNode 4 | { 5 | /// 6 | /// The Priority to insert this node at. Must be set BEFORE adding a node to the queue (ideally just once, in the node's constructor). 7 | /// Should not be manually edited once the node has been enqueued - use queue.UpdatePriority() instead 8 | /// 9 | public TPriority Priority { get; protected internal set; } 10 | 11 | /// 12 | /// Represents the current position in the queue 13 | /// 14 | public int QueueIndex { get; internal set; } 15 | 16 | /// 17 | /// Represents the order the node was inserted in 18 | /// 19 | public long InsertionIndex { get; internal set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/GenericPriorityQueueNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 107084a2a47b29140a657004059979de 3 | timeCreated: 1498323812 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/QPath/Priority Queue/IFixedSizePriorityQueue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Priority_Queue 6 | { 7 | /// 8 | /// A helper-interface only needed to make writing unit tests a bit easier (hence the 'internal' access modifier) 9 | /// 10 | internal interface IFixedSizePriorityQueue : IPriorityQueue 11 | where TPriority : IComparable 12 | { 13 | /// 14 | /// Resize the queue so it can accept more nodes. All currently enqueued nodes are remain. 15 | /// Attempting to decrease the queue size to a size too small to hold the existing nodes results in undefined behavior 16 | /// 17 | void Resize(int maxNodes); 18 | 19 | /// 20 | /// Returns the maximum number of items that can be enqueued at once in this queue. Once you hit this number (ie. once Count == MaxSize), 21 | /// attempting to enqueue another item will cause undefined behavior. 22 | /// 23 | int MaxSize { get; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/IFixedSizePriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9062c6b6e6e353478ae2e81eb363af3 3 | timeCreated: 1498323812 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/QPath/Priority Queue/IPriorityQueue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Priority_Queue 5 | { 6 | /// 7 | /// The IPriorityQueue interface. This is mainly here for purists, and in case I decide to add more implementations later. 8 | /// For speed purposes, it is actually recommended that you *don't* access the priority queue through this interface, since the JIT can 9 | /// (theoretically?) optimize method calls from concrete-types slightly better. 10 | /// 11 | public interface IPriorityQueue : IEnumerable 12 | where TPriority : IComparable 13 | { 14 | /// 15 | /// Enqueue a node to the priority queue. Lower values are placed in front. Ties are broken by first-in-first-out. 16 | /// See implementation for how duplicates are handled. 17 | /// 18 | void Enqueue(TItem node, TPriority priority); 19 | 20 | /// 21 | /// Removes the head of the queue (node with minimum priority; ties are broken by order of insertion), and returns it. 22 | /// 23 | TItem Dequeue(); 24 | 25 | /// 26 | /// Removes every node from the queue. 27 | /// 28 | void Clear(); 29 | 30 | /// 31 | /// Returns whether the given node is in the queue. 32 | /// 33 | bool Contains(TItem node); 34 | 35 | /// 36 | /// Removes a node from the queue. The node does not need to be the head of the queue. 37 | /// 38 | void Remove(TItem node); 39 | 40 | /// 41 | /// Call this method to change the priority of a node. 42 | /// 43 | void UpdatePriority(TItem node, TPriority priority); 44 | 45 | /// 46 | /// Returns the head of the queue, without removing it (use Dequeue() for that). 47 | /// 48 | TItem First { get; } 49 | 50 | /// 51 | /// Returns the number of nodes in the queue. 52 | /// 53 | int Count { get; } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/IPriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39e65a26afad99e4c9af905af21f6af3 3 | timeCreated: 1498323812 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/QPath/Priority Queue/Priority Queue.csproj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0eae3b402791985449a1bb1cf93e4e01 3 | timeCreated: 1498323812 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/Priority Queue.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OptimizedPriorityQueue 5 | 4.1.1 6 | Highly Optimized Priority Queue 7 | BlueRaja 8 | BlueRaja 9 | https://github.com/BlueRaja/High-Speed-Priority-Queue-for-C-Sharp/blob/master/LICENSE.txt 10 | https://github.com/BlueRaja/High-Speed-Priority-Queue-for-C-Sharp 11 | false 12 | A highly optimized Priority Queue for path-finding and related applications 13 | Better multithreaded support; Unity3D support 14 | Copyright 2017 15 | C# priority-queue pathfinding optimized 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/Priority Queue.nuspec.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 765f060888ccf274fb55ba70681ae0e6 3 | timeCreated: 1498323812 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/Properties.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b774543dab2e92445a7c7d4a6408ffb0 3 | folderAsset: yes 4 | timeCreated: 1498323812 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Highly Optimized Priority Queue")] 9 | [assembly: AssemblyDescription("A highly optimized Priority Queue for path-finding and related applications")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Highly Optimized Priority Queue")] 13 | [assembly: AssemblyCopyright("Copyright © BlueRaja 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3eee6b54-af8a-494b-9121-3d46ed09a58b")] 24 | 25 | [assembly: InternalsVisibleToAttribute("Priority Queue Tests")] 26 | 27 | // Version information for an assembly consists of the following four values: 28 | // 29 | // Major Version 30 | // Minor Version 31 | // Build Number 32 | // Revision 33 | // 34 | // You can specify all the values or you can default the Build and Revision Numbers 35 | // by using the '*' as shown below: 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | [assembly: AssemblyVersion("4.1.1")] 38 | [assembly: AssemblyFileVersion("4.1.1")] -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/Properties/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1732278c32b344540866caa1fd994631 3 | timeCreated: 1498323812 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/QPath/Priority Queue/SimplePriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5268255b962897741b65c3ac21782893 3 | timeCreated: 1498323812 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/QPath/Priority Queue/StablePriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0409b6254386e64ebf4bab99a6aefe5 3 | timeCreated: 1498323812 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/QPath/Priority Queue/StablePriorityQueueNode.cs: -------------------------------------------------------------------------------- 1 | namespace Priority_Queue 2 | { 3 | public class StablePriorityQueueNode : FastPriorityQueueNode 4 | { 5 | /// 6 | /// Represents the order the node was inserted in 7 | /// 8 | public long InsertionIndex { get; internal set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/StablePriorityQueueNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9aeb40028a298784da14ff773c6da681 3 | timeCreated: 1498323812 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/QPath/Priority Queue/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Assets/QPath/Priority Queue/packages.config.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 951369d03b14b9b4297ab2409bba42d7 3 | timeCreated: 1498323812 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/QPath/QPath.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace QPath 6 | { 7 | /// 8 | /// 9 | /// Tile[] ourPath = QPath.FindPath( ourWorld, theUnit, startTile, endTile ); 10 | /// 11 | /// theUnit is a object that is the thing actually trying to path between 12 | /// tiles. It might have special logic based on its movement type and the 13 | /// type of tiles being moved through 14 | /// 15 | /// Our tiles need to be able to return the following information: 16 | /// 1) List of neighbours 17 | /// 2) The aggregate cost to enter this tile from another tile 18 | /// 19 | /// 20 | /// 21 | /// 22 | /// 23 | 24 | 25 | public static class QPath { 26 | 27 | public static T[] FindPath( 28 | IQPathWorld world, 29 | IQPathUnit unit, 30 | T startTile, 31 | T endTile, 32 | CostEstimateDelegate costEstimateFunc 33 | ) where T : IQPathTile 34 | { 35 | Debug.Log("QPath::FindPath"); 36 | if( world == null || unit == null || startTile == null || endTile == null ) 37 | { 38 | Debug.LogError("null values passed to QPath::FindPath"); 39 | return null; 40 | } 41 | 42 | // Call on our actual path solver 43 | 44 | 45 | QPath_AStar resolver = new QPath_AStar( world, unit, startTile, endTile, costEstimateFunc ); 46 | 47 | resolver.DoWork(); 48 | 49 | return resolver.GetList(); 50 | } 51 | } 52 | 53 | public delegate float CostEstimateDelegate(IQPathTile a, IQPathTile b); 54 | } -------------------------------------------------------------------------------- /Assets/QPath/QPath.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fb5440530cd7f942a92373995147731 3 | timeCreated: 1498320957 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/QPath/QPath_AStar.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System.Linq; 5 | 6 | namespace QPath 7 | { 8 | public class QPath_AStar where T : IQPathTile { 9 | 10 | public QPath_AStar( 11 | IQPathWorld world, 12 | IQPathUnit unit, 13 | T startTile, 14 | T endTile, 15 | CostEstimateDelegate costEstimateFunc 16 | ) 17 | { 18 | // Do Setup 19 | 20 | this.world = world; 21 | this.unit = unit; 22 | this.startTile = startTile; 23 | this.endTile = endTile; 24 | this.costEstimateFunc = costEstimateFunc; 25 | 26 | // Do we need to explicitly create a graph? 27 | } 28 | 29 | IQPathWorld world; 30 | IQPathUnit unit; 31 | T startTile; 32 | T endTile; 33 | CostEstimateDelegate costEstimateFunc; 34 | 35 | Queue path; 36 | 37 | public void DoWork() 38 | { 39 | Debug.Log("QPath_AStar::DoWork"); 40 | path = new Queue(); 41 | 42 | HashSet< T > closedSet = new HashSet(); 43 | 44 | PathfindingPriorityQueue< T > openSet = new PathfindingPriorityQueue(); 45 | openSet.Enqueue(startTile, 0); 46 | 47 | Dictionary came_From = new Dictionary(); 48 | 49 | Dictionary g_score = new Dictionary(); 50 | g_score[startTile] = 0; 51 | 52 | Dictionary f_score = new Dictionary(); 53 | f_score[startTile] = costEstimateFunc(startTile, endTile); 54 | 55 | while (openSet.Count > 0) 56 | { 57 | T current = openSet.Dequeue(); 58 | 59 | // Check to see if we are there. 60 | if ( System.Object.ReferenceEquals( current, endTile ) ) 61 | { 62 | Reconstruct_path(came_From, current); 63 | return; 64 | } 65 | 66 | closedSet.Add(current); 67 | 68 | foreach (T edge_neighbour in current.GetNeighbours()) 69 | { 70 | T neighbour = edge_neighbour; 71 | 72 | if (closedSet.Contains(neighbour)) 73 | { 74 | continue; // ignore this already completed neighbor 75 | } 76 | 77 | float total_pathfinding_cost_to_neighbor = 78 | neighbour.AggregateCostToEnter( g_score[current], current, unit ); 79 | 80 | if(total_pathfinding_cost_to_neighbor < 0) 81 | { 82 | // Values less than zero represent an invalid/impassable tile 83 | continue; 84 | } 85 | //Debug.Log(total_pathfinding_cost_to_neighbor); 86 | 87 | float tentative_g_score = total_pathfinding_cost_to_neighbor; 88 | 89 | // Is the neighbour already in the open set? 90 | // If so, and if this new score is worse than the old score, 91 | // discard this new result. 92 | if (openSet.Contains(neighbour) && tentative_g_score >= g_score[neighbour]) 93 | { 94 | continue; 95 | } 96 | 97 | // This is either a new tile or we just found a cheaper route to it 98 | came_From[neighbour] = current; 99 | g_score[neighbour] = tentative_g_score; 100 | f_score[neighbour] = g_score[neighbour] + costEstimateFunc(neighbour, endTile); 101 | 102 | openSet.EnqueueOrUpdate(neighbour, f_score[neighbour]); 103 | } // foreach neighbour 104 | } // while 105 | 106 | 107 | } 108 | 109 | private void Reconstruct_path( 110 | Dictionary came_From, 111 | T current) 112 | { 113 | // So at this point, current IS the goal. 114 | // So what we want to do is walk backwards through the Came_From 115 | // map, until we reach the "end" of that map...which will be 116 | // our starting node! 117 | Queue total_path = new Queue(); 118 | total_path.Enqueue(current); // This "final" step is the path is the goal! 119 | 120 | while (came_From.ContainsKey(current)) 121 | { 122 | /* Came_From is a map, where the 123 | * key => value relation is real saying 124 | * some_node => we_got_there_from_this_node 125 | */ 126 | 127 | current = came_From[current]; 128 | total_path.Enqueue(current); 129 | } 130 | 131 | // At this point, total_path is a queue that is running 132 | // backwards from the END tile to the START tile, so let's reverse it. 133 | path = new Queue(total_path.Reverse()); 134 | } 135 | 136 | 137 | public T[] GetList() 138 | { 139 | return path.ToArray(); 140 | } 141 | 142 | } 143 | } -------------------------------------------------------------------------------- /Assets/QPath/QPath_AStar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f83b433c2c8627049b99cce6ba724144 3 | timeCreated: 1498325455 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/QPath/QPath_TileGraph.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace QPath 5 | { 6 | 7 | /// 8 | /// The graph's job is to keep a list of all neighbours leaving a tile 9 | /// 10 | 11 | public class QPath_TileGraph 12 | { 13 | 14 | Dictionary neighbours; 15 | 16 | public QPath_TileGraph( IQPathWorld world ) 17 | { 18 | } 19 | 20 | 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Assets/QPath/QPath_TileGraph.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0259ee5758f2aca458f1600cb9e78f55 3 | timeCreated: 1498325455 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec8cacec9f93b7749bc113ad4396462b 3 | folderAsset: yes 4 | timeCreated: 1499963949 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/BuildingJob.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | public class BuildingJob 6 | { 7 | public BuildingJob( Image BuildingJobIcon, 8 | string BuildingJobName, 9 | float totalProductionNeeded, 10 | float overflowedProduction, 11 | ProductionCompleteDelegate OnProductionComplete, 12 | ProductionBonusDelegate ProductionBonusFunc 13 | ) 14 | { 15 | if(OnProductionComplete == null) 16 | throw new UnityException(); 17 | 18 | this.BuildingJobIcon = BuildingJobIcon; 19 | this.BuildingJobName = BuildingJobName; 20 | this.totalProductionNeeded = totalProductionNeeded; 21 | productionDone = overflowedProduction; 22 | this.OnProductionComplete = OnProductionComplete; 23 | this.ProductionBonusFunc = ProductionBonusFunc; 24 | } 25 | 26 | public float totalProductionNeeded; 27 | public float productionDone; 28 | 29 | public Image BuildingJobIcon; // Ex: Image for the Petra 30 | public string BuildingJobName; // Ex: "Petra" 31 | 32 | public delegate void ProductionCompleteDelegate( ); 33 | public event ProductionCompleteDelegate OnProductionComplete; 34 | 35 | public delegate float ProductionBonusDelegate(); 36 | public ProductionBonusDelegate ProductionBonusFunc; 37 | 38 | /// 39 | /// Dos the work. 40 | /// 41 | /// Number of hammers remaining, or negative is complete/overflow 42 | /// Raw production. 43 | public float DoWork( float rawProduction ) 44 | { 45 | if(ProductionBonusFunc != null) 46 | { 47 | rawProduction *= ProductionBonusFunc(); 48 | } 49 | 50 | productionDone += rawProduction; 51 | 52 | if(productionDone >= totalProductionNeeded) 53 | { 54 | OnProductionComplete(); 55 | } 56 | 57 | return totalProductionNeeded - productionDone; 58 | } 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Assets/Scripts/BuildingJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af99c8cb7f57f534aa890805a6007102 3 | timeCreated: 1503169997 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/CameraKeyboardController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CameraKeyboardController : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | 10 | } 11 | 12 | float moveSpeed = 3.5f; 13 | 14 | // Update is called once per frame 15 | void Update () { 16 | 17 | Vector3 translate = new Vector3 18 | ( 19 | Input.GetAxis("Horizontal"), 20 | 0, 21 | Input.GetAxis("Vertical") 22 | ); 23 | 24 | this.transform.Translate( translate * moveSpeed * Time.deltaTime * (1 + this.transform.position.y / 2), Space.World); 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/Scripts/CameraKeyboardController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f661d73bf3aac9b478f1535e92151884 3 | timeCreated: 1496170786 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/CameraMotion.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CameraMotion : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | oldPosition = this.transform.position; 10 | } 11 | 12 | Vector3 oldPosition; 13 | 14 | // Update is called once per frame 15 | void Update () { 16 | 17 | // TODO: Code to click-and-drag camera 18 | // WASD 19 | // Zoom in and out 20 | 21 | 22 | 23 | CheckIfCameraMoved(); 24 | } 25 | 26 | public void PanToHex( Hex hex ) 27 | { 28 | // TODO: Move camera to hex 29 | } 30 | 31 | HexComponent[] hexes; 32 | 33 | void CheckIfCameraMoved() 34 | { 35 | if(oldPosition != this.transform.position) 36 | { 37 | // SOMETHING moved the camera. 38 | oldPosition = this.transform.position; 39 | 40 | // TODO: Probably HexMap will have a dictionary of all these later 41 | if(hexes == null) 42 | hexes = GameObject.FindObjectsOfType(); 43 | 44 | // TODO: Maybe there's a better way to cull what hexes get updated? 45 | 46 | foreach(HexComponent hex in hexes) 47 | { 48 | hex.UpdatePosition(); 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/Scripts/CameraMotion.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b9228707d769834389b9efe3c801acc 3 | timeCreated: 1493927427 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/City.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System.Linq; 5 | 6 | public class City : MapObject 7 | { 8 | public City() 9 | { 10 | Name = "Brussels"; 11 | 12 | EXAMPLE(); 13 | } 14 | 15 | BuildingJob buildingJob; 16 | 17 | float productionPerTurn = 9001; 18 | 19 | override public void SetHex( Hex newHex ) 20 | { 21 | if(Hex != null) 22 | { 23 | // Will a city ever LEAVE a hex and enter a new one? 24 | Hex.RemoveCity(this); 25 | } 26 | 27 | base.SetHex( newHex ); 28 | 29 | Hex.AddCity( this ); 30 | } 31 | 32 | public void DoTurn() 33 | { 34 | if(buildingJob != null) 35 | { 36 | float workLeft = buildingJob.DoWork( productionPerTurn ); 37 | if(workLeft <= 0) 38 | { 39 | // Job is complete 40 | buildingJob = null; 41 | // TODO: Save overflow 42 | } 43 | } 44 | } 45 | 46 | public BuildingBlueprint[] GetPossibleBuildings() 47 | { 48 | // TODO: Apply tech/uniqueness filters 49 | return BuildingDatabase.GetListOfBuilding(); 50 | } 51 | 52 | void EXAMPLE() 53 | { 54 | buildingJob = new BuildingJob( 55 | null, 56 | "Dwarf Warrior", 57 | 100, 58 | 0, 59 | () => { 60 | this.Hex.HexMap.SpawnUnitAt( 61 | new Unit(), 62 | this.Hex.HexMap.UnitDwarfPrefab, 63 | this.Hex.Q, 64 | this.Hex.R 65 | ); 66 | }, 67 | null 68 | ); 69 | } 70 | 71 | } 72 | 73 | -------------------------------------------------------------------------------- /Assets/Scripts/City.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e135276a829ea254ca1f5eaab9cdb11b 3 | timeCreated: 1503160584 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/Database.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a58bbfc2f1c7844893a7e8c3bb8ac6e 3 | folderAsset: yes 4 | timeCreated: 1506790897 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Database/BuildingDatabase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | 5 | public class BuildingBlueprint 6 | { 7 | public BuildingBlueprint( int id, string name ) 8 | { 9 | MyID = id; 10 | Name = name; 11 | } 12 | 13 | public readonly int MyID; 14 | public string Name; 15 | public int ProductionCost = 0; 16 | public string IconFilename = null; 17 | public int TechID = -1; // The technology that unlocks this building 18 | public int ObsoleteTechId = -1; 19 | 20 | public enum BUILDING_TYPE { BUILDING, GLOBAL_WONDER, NATIONAL_WONDER }; 21 | public BUILDING_TYPE isGlobalWonder = BUILDING_TYPE.BUILDING; 22 | } 23 | 24 | static public class BuildingDatabase 25 | { 26 | static BuildingDatabase() 27 | { 28 | buildings = new Dictionary(); 29 | LoadBuildingBlueprints(); 30 | } 31 | 32 | static Dictionary buildings; 33 | // Consider also keeping a list or maybe even just already 34 | // have an array version 35 | 36 | static public BuildingBlueprint[] GetListOfBuilding() 37 | { 38 | return buildings.Values.ToArray(); 39 | } 40 | 41 | static public BuildingBlueprint GetBuildingById( int id ) 42 | { 43 | // TODO: Check for exceptions? 44 | return buildings[id]; 45 | } 46 | 47 | static void LoadBuildingBlueprints() 48 | { 49 | // Maybe from an XML file? 50 | 51 | BuildingBlueprint bb; 52 | int id = 0; 53 | 54 | bb = new BuildingBlueprint( 55 | id, 56 | "Barracks" 57 | ); 58 | buildings.Add(id++, bb); 59 | 60 | bb = new BuildingBlueprint( 61 | id, 62 | "Granary" 63 | ); 64 | buildings.Add(id++, bb); 65 | 66 | bb = new BuildingBlueprint( 67 | id, 68 | "Monument" 69 | ); 70 | buildings.Add(id++, bb); 71 | 72 | bb = new BuildingBlueprint( 73 | id, 74 | "Library" 75 | ); 76 | buildings.Add(id++, bb); 77 | 78 | } 79 | } 80 | 81 | 82 | -------------------------------------------------------------------------------- /Assets/Scripts/Database/BuildingDatabase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5abf883a785ac0439e214f87e1e9b97 3 | timeCreated: 1506790897 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/Hex.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System.Linq; 5 | using QPath; 6 | 7 | /// 8 | /// The Hex class defines the grid position, world space position, size, 9 | /// neighbours, etc... of a Hex Tile. However, it does NOT interact with 10 | /// Unity directly in any way. 11 | /// 12 | public class Hex : IQPathTile { 13 | 14 | public Hex(HexMap hexMap, int q, int r) 15 | { 16 | this.HexMap = hexMap; 17 | 18 | this.Q = q; 19 | this.R = r; 20 | this.S = -(q + r); 21 | 22 | units = new HashSet(); 23 | } 24 | 25 | // Q + R + S = 0 26 | // S = -(Q + R) 27 | 28 | public readonly int Q; // Column 29 | public readonly int R; // Row 30 | public readonly int S; 31 | 32 | // Data for map generation and maybe in-game effects 33 | public float Elevation; 34 | public float Moisture; 35 | 36 | public enum TERRAIN_TYPE { PLAINS, GRASSLANDS, MARSH, FLOODPLAINS, DESERT, LAKE, OCEAN } 37 | public enum ELEVATION_TYPE { FLAT, HILL, MOUNTAIN, WATER } 38 | 39 | public TERRAIN_TYPE TerrainType { get; set; } 40 | public ELEVATION_TYPE ElevationType { get; set; } 41 | 42 | public enum FEATURE_TYPE { NONE, FOREST, RAINFOREST, MARSH } 43 | public FEATURE_TYPE FeatureType { get; set; } 44 | 45 | 46 | // TODO: Need some kind of property to track hex time (plains, grasslands, etc...) 47 | // TODO: Need property to track hex detail (forest, mine, farm, etc...) 48 | 49 | public readonly HexMap HexMap; 50 | 51 | static readonly float WIDTH_MULTIPLIER = Mathf.Sqrt(3) / 2; 52 | 53 | float radius = 1f; 54 | 55 | HashSet units; 56 | public Unit[] Units { 57 | get{ 58 | return units.ToArray(); 59 | } 60 | } 61 | public City City { get; protected set; } 62 | 63 | public override string ToString() 64 | { 65 | return Q + ", " + R; 66 | } 67 | 68 | /// 69 | /// Returns the world-space position of this hex 70 | /// 71 | public Vector3 Position() 72 | { 73 | return new Vector3( 74 | HexHorizontalSpacing() * (this.Q + this.R/2f), 75 | 0, 76 | HexVerticalSpacing() * this.R 77 | ); 78 | } 79 | 80 | public float HexHeight() 81 | { 82 | return radius * 2; 83 | } 84 | 85 | public float HexWidth() 86 | { 87 | return WIDTH_MULTIPLIER * HexHeight(); 88 | } 89 | 90 | public float HexVerticalSpacing() 91 | { 92 | return HexHeight() * 0.75f; 93 | } 94 | 95 | public float HexHorizontalSpacing() 96 | { 97 | return HexWidth(); 98 | } 99 | 100 | public Vector3 PositionFromCamera() 101 | { 102 | return HexMap.GetHexPosition(this); 103 | } 104 | 105 | public Vector3 PositionFromCamera( Vector3 cameraPosition, float numRows, float numColumns ) 106 | { 107 | float mapHeight = numRows * HexVerticalSpacing(); 108 | float mapWidth = numColumns * HexHorizontalSpacing(); 109 | 110 | Vector3 position = Position(); 111 | 112 | if(HexMap.AllowWrapEastWest) 113 | { 114 | float howManyWidthsFromCamera = Mathf.Round((position.x - cameraPosition.x) / mapWidth); 115 | int howManyWidthToFix = (int)howManyWidthsFromCamera; 116 | 117 | position.x -= howManyWidthToFix * mapWidth; 118 | } 119 | 120 | if(HexMap.AllowWrapNorthSouth) 121 | { 122 | float howManyHeightsFromCamera = Mathf.Round((position.z - cameraPosition.z) / mapHeight); 123 | int howManyHeightsToFix = (int)howManyHeightsFromCamera; 124 | 125 | position.z -= howManyHeightsToFix * mapHeight; 126 | } 127 | 128 | 129 | return position; 130 | } 131 | 132 | public static float CostEstimate(IQPathTile aa, IQPathTile bb) 133 | { 134 | return Distance((Hex)aa, (Hex) bb); 135 | } 136 | 137 | public static float Distance(Hex a, Hex b) 138 | { 139 | // WARNING: Probably Wrong for wrapping 140 | int dQ = Mathf.Abs(a.Q - b.Q); 141 | if(a.HexMap.AllowWrapEastWest) 142 | { 143 | if(dQ > a.HexMap.NumColumns / 2) 144 | dQ = a.HexMap.NumColumns - dQ; 145 | } 146 | 147 | int dR = Mathf.Abs(a.R - b.R); 148 | if(a.HexMap.AllowWrapNorthSouth) 149 | { 150 | if(dR > a.HexMap.NumRows / 2) 151 | dR = a.HexMap.NumRows - dR; 152 | } 153 | 154 | return 155 | Mathf.Max( 156 | dQ, 157 | dR, 158 | Mathf.Abs(a.S - b.S) 159 | ); 160 | } 161 | 162 | public void AddUnit( Unit unit ) 163 | { 164 | if(units == null) 165 | { 166 | units = new HashSet(); 167 | } 168 | 169 | units.Add(unit); 170 | } 171 | 172 | public void RemoveUnit( Unit unit ) 173 | { 174 | if(units != null) 175 | { 176 | units.Remove(unit); 177 | } 178 | } 179 | 180 | public void AddCity( City city ) 181 | { 182 | if(this.City != null) 183 | { 184 | throw new UnityException("Trying to add a city to a hex that already has one!"); 185 | } 186 | 187 | this.City = city; 188 | } 189 | 190 | public void RemoveCity( City city ) 191 | { 192 | if(this.City == null) 193 | { 194 | Debug.LogError("Trying to remove a city where there isn't one!"); 195 | return; 196 | } 197 | 198 | if(this.City != city) 199 | { 200 | Debug.LogError("Trying to remove a city that isn't ours!"); 201 | return; 202 | } 203 | 204 | this.City = null; 205 | } 206 | 207 | /// 208 | /// Returns the most common movement cost for this tile, for a typical melee unit 209 | /// 210 | public int BaseMovementCost( bool isHillWalker, bool isForestWalker, bool isFlyer ) 211 | { 212 | if( (ElevationType == ELEVATION_TYPE.MOUNTAIN || ElevationType == ELEVATION_TYPE.WATER) && isFlyer == false ) 213 | return -99; 214 | 215 | int moveCost = 1; 216 | 217 | if( ElevationType == ELEVATION_TYPE.HILL && isHillWalker == false ) 218 | moveCost += 1; 219 | 220 | if( (FeatureType == FEATURE_TYPE.FOREST || FeatureType == FEATURE_TYPE.RAINFOREST) && isForestWalker == false ) 221 | moveCost += 1; 222 | 223 | return moveCost; 224 | } 225 | 226 | Hex[] neighbours; 227 | 228 | #region IQPathTile implementation 229 | public IQPathTile[] GetNeighbours() 230 | { 231 | if(this.neighbours != null) 232 | return this.neighbours; 233 | 234 | List neighbours = new List(); 235 | 236 | neighbours.Add( HexMap.GetHexAt( Q + 1, R + 0 ) ); 237 | neighbours.Add( HexMap.GetHexAt( Q + -1, R + 0 ) ); 238 | neighbours.Add( HexMap.GetHexAt( Q + 0, R + +1 ) ); 239 | neighbours.Add( HexMap.GetHexAt( Q + 0, R + -1 ) ); 240 | neighbours.Add( HexMap.GetHexAt( Q + +1, R + -1 ) ); 241 | neighbours.Add( HexMap.GetHexAt( Q + -1, R + +1 ) ); 242 | 243 | List neighbours2 = new List(); 244 | 245 | foreach(Hex h in neighbours) 246 | { 247 | if(h != null) 248 | { 249 | neighbours2.Add(h); 250 | } 251 | } 252 | 253 | this.neighbours = neighbours2.ToArray(); 254 | 255 | return this.neighbours; 256 | } 257 | 258 | public float AggregateCostToEnter(float costSoFar, IQPathTile sourceTile, IQPathUnit theUnit) 259 | { 260 | // TODO: We are ignoring source tile right now, this will have to change when 261 | // we have rivers. 262 | return ((Unit)theUnit).AggregateTurnsToEnterHex(this, costSoFar); 263 | } 264 | #endregion 265 | } 266 | -------------------------------------------------------------------------------- /Assets/Scripts/Hex.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a91ff27f4cef814a8a31e27bf5d9619 3 | timeCreated: 1493919769 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/HexComponent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class HexComponent : MonoBehaviour { 6 | 7 | public Hex Hex; 8 | public HexMap HexMap; 9 | 10 | public float VerticalOffset = 0; // Map objects on this hex should be rendered higher than usual 11 | 12 | public void UpdatePosition() 13 | { 14 | this.transform.position = Hex.PositionFromCamera( 15 | Camera.main.transform.position, 16 | HexMap.NumRows, 17 | HexMap.NumColumns 18 | ); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Assets/Scripts/HexComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42d387cdf44b0e24dbff33a8375e4c38 3 | timeCreated: 1493927259 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/HexMap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 803fe44eecf546a4d92ae526cb43a9da 3 | timeCreated: 1493919077 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/HexMap_Continent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class HexMap_Continent : HexMap { 6 | 7 | 8 | 9 | override public void GenerateMap() 10 | { 11 | // First, call the base version to make all the hexes we need 12 | base.GenerateMap(); 13 | 14 | int numContinents = 3; 15 | int continentSpacing = NumColumns / numContinents; 16 | 17 | // Uncomment this to generate the same "random" terrain every time. 18 | Random.InitState(0); 19 | 20 | 21 | for (int c = 0; c < numContinents; c++) 22 | { 23 | // Make some kind of raised area 24 | int numSplats = Random.Range(4, 8); 25 | for (int i = 0; i < numSplats; i++) 26 | { 27 | int range = Random.Range(5, 8); 28 | int y = Random.Range(range, NumRows - range); 29 | int x = Random.Range(0, 10) - y/2 + (c * continentSpacing); 30 | 31 | ElevateArea(x, y, range); 32 | } 33 | 34 | } 35 | 36 | // Add lumpiness Perlin Noise? 37 | float noiseResolution = 0.01f; 38 | Vector2 noiseOffset = new Vector2( Random.Range(0f, 1f), Random.Range(0f, 1f) ); 39 | 40 | float noiseScale = 2f; // Larger values makes more islands (and lakes, I guess) 41 | 42 | 43 | for (int column = 0; column < NumColumns; column++) 44 | { 45 | for (int row = 0; row < NumRows; row++) 46 | { 47 | Hex h = GetHexAt(column, row); 48 | float n = 49 | Mathf.PerlinNoise( ((float)column/Mathf.Max(NumColumns,NumRows) / noiseResolution) + noiseOffset.x, 50 | ((float)row/Mathf.Max(NumColumns,NumRows) / noiseResolution) + noiseOffset.y ) 51 | - 0.5f; 52 | h.Elevation += n * noiseScale; 53 | } 54 | } 55 | 56 | // Simulate rainfall/moisture (probably just Perlin it for now) and set plains/grasslands + forest 57 | noiseResolution = 0.05f; 58 | noiseOffset = new Vector2( Random.Range(0f, 1f), Random.Range(0f, 1f) ); 59 | 60 | noiseScale = 2f; // Larger values makes more islands (and lakes, I guess) 61 | 62 | 63 | for (int column = 0; column < NumColumns; column++) 64 | { 65 | for (int row = 0; row < NumRows; row++) 66 | { 67 | Hex h = GetHexAt(column, row); 68 | float n = 69 | Mathf.PerlinNoise( ((float)column/Mathf.Max(NumColumns,NumRows) / noiseResolution) + noiseOffset.x, 70 | ((float)row/Mathf.Max(NumColumns,NumRows) / noiseResolution) + noiseOffset.y ) 71 | - 0.5f; 72 | h.Moisture = n * noiseScale; 73 | } 74 | } 75 | 76 | 77 | // Now make sure all the hex visuals are updated to match the data. 78 | 79 | UpdateHexVisuals(); 80 | 81 | Unit unit = new Unit(); 82 | 83 | // For development, turn on CanBuildCities on this unit 84 | unit.CanBuildCities = true; 85 | 86 | SpawnUnitAt(unit, UnitDwarfPrefab, 36, 15); 87 | 88 | City city = new City(); 89 | SpawnCityAt(city, CityPrefab, 35, 15); 90 | } 91 | 92 | void ElevateArea(int q, int r, int range, float centerHeight = .8f) 93 | { 94 | Hex centerHex = GetHexAt(q, r); 95 | 96 | Hex[] areaHexes = GetHexesWithinRangeOf(centerHex, range); 97 | 98 | foreach(Hex h in areaHexes) 99 | { 100 | //if(h.Elevation < 0) 101 | //h.Elevation = 0; 102 | 103 | h.Elevation = centerHeight * Mathf.Lerp( 1f, 0.25f, Mathf.Pow(Hex.Distance(centerHex, h) / range,2f) ); 104 | } 105 | } 106 | 107 | } 108 | -------------------------------------------------------------------------------- /Assets/Scripts/HexMap_Continent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c215716c21e580348817e840d00db793 3 | timeCreated: 1496161421 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/MapObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using QPath; 5 | using System.Linq; 6 | 7 | public class MapObject 8 | { 9 | public MapObject() 10 | { 11 | } 12 | 13 | public string Name; 14 | public int HitPoints = 100; 15 | public bool CanBeAttacked = true; 16 | public int FactionID = 0; 17 | 18 | public bool IsDestroyed { get; private set; } 19 | 20 | public Hex Hex { get; protected set; } 21 | 22 | public delegate void ObjectMovedDelegate ( Hex oldHex, Hex newHex ); 23 | public event ObjectMovedDelegate OnObjectMoved; 24 | 25 | public delegate void ObjectDestroyedDelegate ( MapObject mo ); 26 | public event ObjectDestroyedDelegate OnObjectDestroyed; 27 | 28 | /// 29 | /// This object is being removed from the map/game 30 | /// 31 | virtual public void Destroy() 32 | { 33 | IsDestroyed = true; 34 | 35 | if(OnObjectDestroyed != null) 36 | { 37 | OnObjectDestroyed( this ); 38 | } 39 | } 40 | 41 | virtual public void SetHex( Hex newHex ) 42 | { 43 | Hex oldHex = Hex; 44 | 45 | Hex = newHex; 46 | 47 | if(OnObjectMoved != null) 48 | { 49 | OnObjectMoved(oldHex, newHex); 50 | } 51 | } 52 | 53 | } 54 | 55 | 56 | -------------------------------------------------------------------------------- /Assets/Scripts/MapObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54f04b180997795449d1b45366ad05ea 3 | timeCreated: 1503161314 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/MouseController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.EventSystems; 5 | 6 | public class MouseController : MonoBehaviour 7 | { 8 | 9 | // Use this for initialization 10 | void Start () 11 | { 12 | Update_CurrentFunc = Update_DetectModeStart; 13 | 14 | hexMap = GameObject.FindObjectOfType(); 15 | 16 | lineRenderer = transform.GetComponentInChildren(); 17 | 18 | selectionController = GameObject.FindObjectOfType(); 19 | } 20 | 21 | SelectionController selectionController; 22 | 23 | // Generic bookkeeping variables 24 | HexMap hexMap; 25 | Hex hexUnderMouse; 26 | Hex hexLastUnderMouse; 27 | Vector3 lastMousePosition; // From Input.mousePosition 28 | 29 | // Camera Dragging bookkeeping variables 30 | int mouseDragThreshold = 1; // Threshold of mouse movement to start a drag 31 | Vector3 lastMouseGroundPlanePosition; 32 | Vector3 cameraTargetOffset; 33 | 34 | 35 | Hex[] hexPath; 36 | LineRenderer lineRenderer; 37 | 38 | delegate void UpdateFunc(); 39 | UpdateFunc Update_CurrentFunc; 40 | 41 | public LayerMask LayerIDForHexTiles; 42 | 43 | void Update() 44 | { 45 | hexUnderMouse = MouseToHex(); 46 | 47 | if( Input.GetKeyDown(KeyCode.Escape) ) 48 | { 49 | selectionController.SelectedUnit = null; 50 | CancelUpdateFunc(); 51 | } 52 | 53 | Update_CurrentFunc(); 54 | 55 | // Always do camera zooms (check for being over a scroll UI later) 56 | Update_ScrollZoom(); 57 | 58 | lastMousePosition = Input.mousePosition; 59 | hexLastUnderMouse = hexUnderMouse; 60 | 61 | if(selectionController.SelectedUnit != null) 62 | { 63 | DrawPath( ( hexPath != null ) ? hexPath : selectionController.SelectedUnit.GetHexPath() ); 64 | } 65 | else 66 | { 67 | DrawPath( null ); // Clear the path display 68 | } 69 | } 70 | 71 | void DrawPath(Hex[] hexPath) 72 | { 73 | if(hexPath == null || hexPath.Length == 0) 74 | { 75 | lineRenderer.enabled = false; 76 | return; 77 | } 78 | lineRenderer.enabled = true; 79 | 80 | Vector3[] ps = new Vector3[ hexPath.Length ]; 81 | 82 | for (int i = 0; i < hexPath.Length; i++) 83 | { 84 | GameObject hexGO = hexMap.GetHexGO(hexPath[i]); 85 | ps[i] = hexGO.transform.position + (Vector3.up*0.1f); 86 | } 87 | 88 | lineRenderer.positionCount = ps.Length; 89 | lineRenderer.SetPositions(ps); 90 | } 91 | 92 | 93 | public void CancelUpdateFunc() 94 | { 95 | Update_CurrentFunc = Update_DetectModeStart; 96 | 97 | // Also do cleanup of any UI stuff associated with modes. 98 | hexPath = null; 99 | } 100 | 101 | void Update_DetectModeStart() 102 | { 103 | // Check here(?) to see if we are over a UI element, 104 | // if so -- ignore mouse clicks and such. 105 | if( EventSystem.current.IsPointerOverGameObject() ) 106 | { 107 | // TODO: Do we want to ignore ALL GUI objects? Consider 108 | // things like unit health bars, resource icons, etc... 109 | // Although, if those are set to NotInteractive or Not Block 110 | // Raycasts, maybe this will return false for them anyway. 111 | return; 112 | } 113 | 114 | if (Input.GetMouseButtonDown (0)) 115 | { 116 | // Left mouse button just went down. 117 | // This doesn't do anything by itself, really. 118 | Debug.Log("MOUSE DOWN"); 119 | } 120 | else if( Input.GetMouseButtonUp(0) ) 121 | { 122 | Debug.Log("MOUSE UP -- click!"); 123 | 124 | // TODO: Are we clicking on a hex with a unit? 125 | // If so, select it 126 | 127 | Unit[] us = hexUnderMouse.Units; 128 | 129 | // TODO: Implement cycling through multiple units in the same tile 130 | 131 | if(us.Length > 0) 132 | { 133 | selectionController.SelectedUnit = us[0]; 134 | 135 | // NOTE: Selecting a unit does NOT change our mouse mode 136 | 137 | //Update_CurrentFunc = Update_UnitMovement; 138 | } 139 | 140 | } 141 | else if ( selectionController.SelectedUnit != null && Input.GetMouseButtonDown(1) ) 142 | { 143 | // We have a selected unit, and we've pushed down the right 144 | // mouse button, so enter unit movement mode. 145 | Update_CurrentFunc = Update_UnitMovement; 146 | 147 | } 148 | else if( Input.GetMouseButton(0) && 149 | Vector3.Distance( Input.mousePosition, lastMousePosition) > mouseDragThreshold ) 150 | { 151 | // Left button is being held down AND the mouse moved? That's a camera drag! 152 | Update_CurrentFunc = Update_CameraDrag; 153 | lastMouseGroundPlanePosition = MouseToGroundPlane(Input.mousePosition); 154 | Update_CurrentFunc(); 155 | } 156 | else if( selectionController.SelectedUnit != null && Input.GetMouseButton(1) ) 157 | { 158 | // We have a selected unit, and we are holding down the mouse 159 | // button. We are in unit movement mode -- show a path from 160 | // unit to mouse position via the pathfinding system. 161 | } 162 | 163 | } 164 | 165 | Hex MouseToHex() 166 | { 167 | Ray mouseRay = Camera.main.ScreenPointToRay (Input.mousePosition); 168 | RaycastHit hitInfo; 169 | 170 | int layerMask = LayerIDForHexTiles.value; 171 | 172 | if( Physics.Raycast(mouseRay, out hitInfo, Mathf.Infinity, layerMask) ) 173 | { 174 | // Something got hit 175 | //Debug.Log( hitInfo.collider.name ); 176 | 177 | // The collider is a child of the "correct" game object that we want. 178 | GameObject hexGO = hitInfo.rigidbody.gameObject; 179 | 180 | return hexMap.GetHexFromGameObject(hexGO); 181 | } 182 | 183 | //Debug.Log("Found nothing."); 184 | return null; 185 | } 186 | 187 | Vector3 MouseToGroundPlane(Vector3 mousePos) 188 | { 189 | Ray mouseRay = Camera.main.ScreenPointToRay (mousePos); 190 | // What is the point at which the mouse ray intersects Y=0 191 | if (mouseRay.direction.y >= 0) { 192 | //Debug.LogError("Why is mouse pointing up?"); 193 | return Vector3.zero; 194 | } 195 | float rayLength = (mouseRay.origin.y / mouseRay.direction.y); 196 | return mouseRay.origin - (mouseRay.direction * rayLength); 197 | } 198 | 199 | void Update_UnitMovement () 200 | { 201 | if( Input.GetMouseButtonUp(1) || selectionController.SelectedUnit == null ) 202 | { 203 | Debug.Log("Complete unit movement."); 204 | 205 | if(selectionController.SelectedUnit != null) 206 | { 207 | selectionController.SelectedUnit.SetHexPath(hexPath); 208 | 209 | // TODO: Tell Unit and/or HexMap to process unit movement 210 | 211 | StartCoroutine( hexMap.DoUnitMoves(selectionController.SelectedUnit) ); 212 | } 213 | 214 | CancelUpdateFunc(); 215 | return; 216 | } 217 | 218 | // We have a selected unit 219 | 220 | // Look at the hex under our mouse 221 | 222 | // Is this a different hex than before (or we don't already have a path) 223 | if( hexPath == null || hexUnderMouse != hexLastUnderMouse ) 224 | { 225 | // Do a pathfinding search to that hex 226 | hexPath = QPath.QPath.FindPath( hexMap, selectionController.SelectedUnit, selectionController.SelectedUnit.Hex, hexUnderMouse, Hex.CostEstimate ); 227 | } 228 | 229 | } 230 | 231 | void Update_CameraDrag () 232 | { 233 | if( Input.GetMouseButtonUp(0) ) 234 | { 235 | Debug.Log("Cancelling camera drag."); 236 | CancelUpdateFunc(); 237 | return; 238 | } 239 | 240 | // Right now, all we need are camera controls 241 | 242 | Vector3 hitPos = MouseToGroundPlane(Input.mousePosition); 243 | 244 | Vector3 diff = lastMouseGroundPlanePosition - hitPos; 245 | Camera.main.transform.Translate (diff, Space.World); 246 | 247 | lastMouseGroundPlanePosition = hitPos = MouseToGroundPlane(Input.mousePosition); 248 | 249 | 250 | 251 | } 252 | 253 | void Update_ScrollZoom() 254 | { 255 | // Zoom to scrollwheel 256 | float scrollAmount = Input.GetAxis ("Mouse ScrollWheel"); 257 | float minHeight = 2; 258 | float maxHeight = 20; 259 | // Move camera towards hitPos 260 | Vector3 hitPos = MouseToGroundPlane(Input.mousePosition); 261 | Vector3 dir = hitPos - Camera.main.transform.position; 262 | 263 | Vector3 p = Camera.main.transform.position; 264 | 265 | // Stop zooming out at a certain distance. 266 | // TODO: Maybe you should still slide around at 20 zoom? 267 | if (scrollAmount > 0 || p.y < (maxHeight - 0.1f)) { 268 | cameraTargetOffset += dir * scrollAmount; 269 | } 270 | Vector3 lastCameraPosition = Camera.main.transform.position; 271 | Camera.main.transform.position = Vector3.Lerp(Camera.main.transform.position, Camera.main.transform.position + cameraTargetOffset, Time.deltaTime * 5f); 272 | cameraTargetOffset -= Camera.main.transform.position - lastCameraPosition; 273 | 274 | 275 | p = Camera.main.transform.position; 276 | if (p.y < minHeight) { 277 | p.y = minHeight; 278 | } 279 | if (p.y > maxHeight) { 280 | p.y = maxHeight; 281 | } 282 | Camera.main.transform.position = p; 283 | 284 | // Change camera angle 285 | Camera.main.transform.rotation = Quaternion.Euler ( 286 | Mathf.Lerp (30, 75, Camera.main.transform.position.y / maxHeight), 287 | Camera.main.transform.rotation.eulerAngles.y, 288 | Camera.main.transform.rotation.eulerAngles.z 289 | ); 290 | 291 | 292 | } 293 | 294 | void Update_CityView() 295 | { 296 | // Can you still click on a unit you see during city view? 297 | 298 | Update_DetectModeStart(); 299 | } 300 | 301 | public void StartCityView() 302 | { 303 | Update_CurrentFunc = Update_CityView; 304 | } 305 | 306 | 307 | } 308 | -------------------------------------------------------------------------------- /Assets/Scripts/MouseController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c35d801997d7455499e663ac99d3ed14 3 | timeCreated: 1496170328 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/Player.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System.Linq; 5 | 6 | 7 | public class Player 8 | { 9 | public Player( string name ) 10 | { 11 | PlayerName = name; 12 | 13 | units = new HashSet(); 14 | cities = new HashSet(); 15 | } 16 | 17 | public string PlayerName; 18 | 19 | public enum PlayerType { LOCAL, AI, REMOTE }; 20 | public PlayerType Type = PlayerType.LOCAL; 21 | 22 | private HashSet units; 23 | private HashSet cities; 24 | 25 | public Unit[] Units { 26 | get { return units.ToArray(); } 27 | } 28 | public City[] Cities { 29 | get { return cities.ToArray(); } 30 | } 31 | 32 | public void AddUnit( Unit u ) 33 | { 34 | units.Add(u); 35 | u.OnObjectDestroyed += OnUnitDestroyed; 36 | } 37 | 38 | public void OnUnitDestroyed( MapObject mo ) 39 | { 40 | units.Remove( (Unit)mo ); 41 | } 42 | 43 | public void AddCity ( City c ) 44 | { 45 | cities.Add(c); 46 | c.OnObjectDestroyed += OnCityDestroyed; 47 | } 48 | 49 | public void OnCityDestroyed( MapObject mo ) 50 | { 51 | cities.Remove( (City)mo ); 52 | } 53 | 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Assets/Scripts/Player.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 667b3c486d11f1e4b9945b5a5edae0f4 3 | timeCreated: 1504289315 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/TurnController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class TurnController : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | hexMap = GameObject.FindObjectOfType(); 10 | selectionController = GameObject.FindObjectOfType(); 11 | } 12 | 13 | HexMap hexMap; 14 | SelectionController selectionController; 15 | 16 | public GameObject EndTurnButton; 17 | public GameObject NextUnitButton; 18 | 19 | public void Update() 20 | { 21 | // Is the current player an AI? 22 | // If so, instruct AI to do its move. 23 | if(hexMap.CurrentPlayer.Type == Player.PlayerType.AI) 24 | { 25 | // Call AI logic function whatever here. 26 | hexMap.AdvanceToNextPlayer(); 27 | return; 28 | } 29 | 30 | // Which button should be visible in the bottom-right? 31 | // Are any units waiting for commands? 32 | Unit[] units = hexMap.CurrentPlayer.Units; 33 | EndTurnButton.SetActive(true); 34 | NextUnitButton.SetActive(false); 35 | foreach(Unit u in units) 36 | { 37 | if(u.UnitWaitingForOrders()) 38 | { 39 | EndTurnButton.SetActive(false); 40 | NextUnitButton.SetActive(true); 41 | break; 42 | } 43 | } 44 | 45 | // Is a city waiting with an empty production queue? 46 | } 47 | 48 | public void EndTurn() 49 | { 50 | Debug.Log("EndTurn"); 51 | Unit[] units = hexMap.CurrentPlayer.Units; 52 | City[] cities = hexMap.CurrentPlayer.Cities; 53 | 54 | // First check to see if there are any units that have enqueued moves. 55 | foreach(Unit u in units) 56 | { 57 | // Do those moves 58 | while( u.DoMove() ) 59 | { 60 | // TODO: WAIT FOR ANIMATION TO COMPLETE! 61 | } 62 | } 63 | 64 | // Now are any units waiting for orders? If so, halt EndTurn() 65 | foreach(Unit u in units) 66 | { 67 | if(u.UnitWaitingForOrders()) 68 | { 69 | // Select the unit 70 | selectionController.SelectedUnit = u; 71 | 72 | // Stop processing the end turn 73 | return; 74 | } 75 | } 76 | 77 | // Heal units that are resting 78 | 79 | // Reset unit movement 80 | foreach(Unit u in units) 81 | { 82 | u.RefreshMovement(); 83 | } 84 | 85 | // If we get to this point, no units are waiting for orders, so process cities 86 | 87 | foreach(City c in cities) 88 | { 89 | c.DoTurn(); 90 | } 91 | 92 | 93 | // Go to next player 94 | selectionController.SelectedUnit = null; 95 | selectionController.SelectedCity = null; 96 | hexMap.AdvanceToNextPlayer(); 97 | 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /Assets/Scripts/TurnController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e2f1712a596c3048ac11f58cb3d685d 3 | timeCreated: 1503170620 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/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef555786ed85d6e48b7310dd798e6598 3 | folderAsset: yes 4 | timeCreated: 1499963961 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/BuildCityButton.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class BuildCityButton : MonoBehaviour { 6 | 7 | public void BuildCity() 8 | { 9 | City city = new City(); 10 | 11 | HexMap map = GameObject.FindObjectOfType(); 12 | SelectionController sc = GameObject.FindObjectOfType(); 13 | 14 | map.SpawnCityAt( 15 | city, 16 | map.CityPrefab, 17 | sc.SelectedUnit.Hex.Q, 18 | sc.SelectedUnit.Hex.R 19 | ); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/BuildCityButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42ced76abe3c21f43b31815a09964089 3 | timeCreated: 1503160595 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/UI/FitGridToChildren.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class FitGridToChildren : MonoBehaviour { 7 | 8 | // Use this for initialization 9 | void Start () 10 | { 11 | grid = GetComponent(); 12 | } 13 | 14 | GridLayoutGroup grid; 15 | 16 | // Update is called once per frame 17 | void Update () 18 | { 19 | // TODO: Instead of every frame, check for changes in size 20 | // or be triggered by something? 21 | ResizeMe(); 22 | } 23 | 24 | void ResizeMe() 25 | { 26 | int numChildren = this.transform.childCount; 27 | 28 | if(numChildren == 0) 29 | { 30 | SetHeight(0); 31 | return; 32 | } 33 | 34 | float childHeight = 35 | this.transform.GetChild(0).GetComponent().rect.height; 36 | 37 | // We need to add the vertical spacing to the child height 38 | 39 | childHeight += grid.spacing.y; 40 | 41 | float totalChildHeight = childHeight * numChildren; 42 | 43 | // We need to account for padding! 44 | 45 | totalChildHeight += grid.padding.top + grid.padding.bottom; 46 | 47 | // Remove the extra grid spacing 48 | totalChildHeight -= grid.spacing.y; 49 | 50 | SetHeight( totalChildHeight ); 51 | } 52 | 53 | void SetHeight( float h ) 54 | { 55 | Vector2 v = GetComponent().sizeDelta; 56 | 57 | v.y = h; 58 | 59 | GetComponent().sizeDelta = v; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/FitGridToChildren.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2f76404925d371469c3d4ba2622497f 3 | timeCreated: 1506788787 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/UI/ListBuildableItems.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class ListBuildableItems : MonoBehaviour { 7 | 8 | // Use this for initialization 9 | void Start () { 10 | 11 | // TODO: Get list of buildings specific to this CITY 12 | 13 | BuildingBlueprint[] blueprintsForThisCity = /*thisCity.GetPossibleBuildings()*/ 14 | BuildingDatabase.GetListOfBuilding(); 15 | 16 | PopulateBuildables( blueprintsForThisCity ); 17 | } 18 | 19 | public GameObject BuildableItemPrefab; 20 | 21 | public void PopulateBuildables( BuildingBlueprint[] buildings ) 22 | { 23 | // We are going to be passed a list of valid buildables 24 | // for this city (based on technology, completed wonders, 25 | // available resource, and stuff the city doesn't have yet.) 26 | 27 | 28 | for (int i = 0; i < buildings.Length; i++) 29 | { 30 | GameObject go = (GameObject)Instantiate( BuildableItemPrefab, this.transform ); 31 | 32 | go.GetComponentInChildren().text = buildings[i].Name; 33 | 34 | 35 | // IF you get weird scaling, do this after instantiating: 36 | // theSpawnedGameObject.transform.localScale = Vector3.one 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/ListBuildableItems.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc735686fe1b66a4aaa999a4a51f842c 3 | timeCreated: 1506789684 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/UI/SkipUnitTurnButton.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SkipUnitTurnButton : MonoBehaviour { 6 | 7 | public void SkipUnitTurn() 8 | { 9 | SelectionController sc = GameObject.FindObjectOfType(); 10 | 11 | Unit u = sc.SelectedUnit; 12 | 13 | if(u == null) 14 | { 15 | Debug.LogError("How is this button active if there's no selected unit?!?!?!"); 16 | return; 17 | } 18 | 19 | u.SkipThisUnit = true; 20 | 21 | // Might as well go to the next idle unit 22 | 23 | sc.SelectNextUnit( true ); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/SkipUnitTurnButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a91e2d013015bc6408dc5da5e29120f4 3 | timeCreated: 1504979013 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/UI/UnitSelectionPanel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class UnitSelectionPanel : MonoBehaviour { 7 | 8 | // Use this for initialization 9 | void Start () { 10 | selectionController = GameObject.FindObjectOfType(); 11 | } 12 | 13 | public Text Title; 14 | public Text Movement; 15 | public Text HexPath; 16 | 17 | public GameObject CityBuildButton; 18 | 19 | SelectionController selectionController; 20 | 21 | // Update is called once per frame 22 | void Update () { 23 | 24 | if(selectionController.SelectedUnit != null) 25 | { 26 | 27 | Title.text = selectionController.SelectedUnit.Name; 28 | 29 | Movement.text = string.Format( 30 | "{0}/{1}", 31 | selectionController.SelectedUnit.MovementRemaining, 32 | selectionController.SelectedUnit.Movement 33 | ); 34 | 35 | Hex[] hexPath = selectionController.SelectedUnit.GetHexPath(); 36 | HexPath.text = hexPath == null ? "0" : hexPath.Length.ToString(); 37 | 38 | 39 | if( selectionController.SelectedUnit.CanBuildCities && selectionController.SelectedUnit.Hex.City == null) 40 | { 41 | CityBuildButton.SetActive( true ); 42 | } 43 | else 44 | { 45 | CityBuildButton.SetActive( false ); 46 | } 47 | 48 | } 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/UnitSelectionPanel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b3677d625939cf4a86d063ece1e0bdf 3 | timeCreated: 1499963944 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/Unit.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using QPath; 5 | using System.Linq; 6 | 7 | public class Unit : MapObject, IQPathUnit { 8 | 9 | public Unit() 10 | { 11 | Name = "Dwarf"; 12 | } 13 | 14 | public int Strenth = 8; 15 | public int Movement = 2; 16 | public int MovementRemaining = 2; 17 | public bool CanBuildCities = false; 18 | public bool SkipThisUnit = false; 19 | 20 | 21 | /// 22 | /// List of hexes to walk through (from pathfinder). 23 | /// NOTE: First item is always the hex we are standing in. 24 | /// 25 | List hexPath; 26 | 27 | // TODO: This should probably be moved to some kind of central option/config file 28 | const bool MOVEMENT_RULES_LIKE_CIV6 = true; 29 | 30 | public void DUMMY_PATHING_FUNCTION() 31 | { 32 | 33 | /*QPath.CostEstimateDelegate ced = (IQPathTile a, IQPathTile b) => ( 34 | return Hex.Distance(a, b); 35 | );*/ 36 | 37 | Hex[] pathHexes = QPath.QPath.FindPath( 38 | Hex.HexMap, 39 | this, 40 | Hex, 41 | Hex.HexMap.GetHexAt( Hex.Q + 6, Hex.R ), 42 | Hex.CostEstimate 43 | ); 44 | 45 | Debug.Log("Got pathfinding path of length: " + pathHexes.Length); 46 | 47 | SetHexPath(pathHexes); 48 | } 49 | 50 | public void ClearHexPath() 51 | { 52 | SkipThisUnit = false; 53 | this.hexPath = new List(); 54 | } 55 | 56 | public void SetHexPath( Hex[] hexArray ) 57 | { 58 | SkipThisUnit = false; 59 | this.hexPath = new List( hexArray ); 60 | } 61 | 62 | public Hex[] GetHexPath() 63 | { 64 | return (this.hexPath == null ) ? null : this.hexPath.ToArray(); 65 | } 66 | 67 | public int GetHexPathLength() 68 | { 69 | return this.hexPath.Count; 70 | } 71 | 72 | public bool UnitWaitingForOrders() 73 | { 74 | if(SkipThisUnit) 75 | { 76 | return false; 77 | } 78 | 79 | // Returns true if we have movement left but nothing queued 80 | if( 81 | MovementRemaining > 0 && 82 | (hexPath==null || hexPath.Count==0) 83 | // TODO: Maybe we've been told to Fortify/Alert/SkipTurn 84 | ) 85 | { 86 | return true; 87 | } 88 | 89 | return false; 90 | } 91 | 92 | public void RefreshMovement() 93 | { 94 | SkipThisUnit = false; 95 | MovementRemaining = Movement; 96 | } 97 | 98 | /// 99 | /// Processes one tile worth of movement for the unit 100 | /// 101 | /// Returns true if this should be called immediately again. 102 | public bool DoMove() 103 | { 104 | Debug.Log("DoMove"); 105 | // Do queued move 106 | 107 | if(MovementRemaining <= 0) 108 | return false; 109 | 110 | if(hexPath == null || hexPath.Count == 0) 111 | { 112 | return false; 113 | } 114 | 115 | // Grab the first hex from our queue 116 | Hex hexWeAreLeaving = hexPath[0]; 117 | Hex newHex = hexPath[1]; 118 | 119 | int costToEnter = MovementCostToEnterHex( newHex ); 120 | 121 | if( costToEnter > MovementRemaining && MovementRemaining < Movement && MOVEMENT_RULES_LIKE_CIV6 ) 122 | { 123 | // We can't enter the hex this turn 124 | return false; 125 | } 126 | 127 | hexPath.RemoveAt(0); 128 | 129 | if( hexPath.Count == 1 ) 130 | { 131 | // The only hex left in the list, is the one we are moving to now, 132 | // therefore we have no more path to follow, so let's just clear 133 | // the queue completely to avoid confusion. 134 | hexPath = null; 135 | } 136 | 137 | // Move to the new Hex 138 | SetHex( newHex ); 139 | MovementRemaining = Mathf.Max(MovementRemaining-costToEnter, 0); 140 | 141 | return hexPath != null && MovementRemaining > 0; 142 | } 143 | 144 | public int MovementCostToEnterHex( Hex hex ) 145 | { 146 | // TODO: Implement different movement traits 147 | 148 | return hex.BaseMovementCost( false, false, false ); 149 | } 150 | 151 | public float AggregateTurnsToEnterHex( Hex hex, float turnsToDate ) 152 | { 153 | // The issue at hand is that if you are trying to enter a tile 154 | // with a movement cost greater than your current remaining movement 155 | // points, this will either result in a cheaper-than expected 156 | // turn cost (Civ5) or a more-expensive-than expected turn cost (Civ6) 157 | 158 | float baseTurnsToEnterHex = MovementCostToEnterHex(hex) / Movement; // Example: Entering a forest is "1" turn 159 | 160 | if(baseTurnsToEnterHex < 0) 161 | { 162 | // Impassible terrain 163 | //Debug.Log("Impassible terrain at:" + hex.ToString()); 164 | return -99999; 165 | } 166 | 167 | if(baseTurnsToEnterHex > 1) 168 | { 169 | // Even if something costs 3 to enter and we have a max move of 2, 170 | // you can always enter it using a full turn of movement. 171 | baseTurnsToEnterHex = 1; 172 | } 173 | 174 | 175 | float turnsRemaining = MovementRemaining / Movement; // Example, if we are at 1/2 move, then we have .5 turns left 176 | 177 | float turnsToDateWhole = Mathf.Floor(turnsToDate); // Example: 4.33 becomes 4 178 | float turnsToDateFraction = turnsToDate - turnsToDateWhole; // Example: 4.33 becomes 0.33 179 | 180 | if( (turnsToDateFraction > 0 && turnsToDateFraction < 0.01f) || turnsToDateFraction > 0.99f ) 181 | { 182 | Debug.LogError("Looks like we've got floating-point drift: " + turnsToDate); 183 | 184 | if( turnsToDateFraction < 0.01f ) 185 | turnsToDateFraction = 0; 186 | 187 | if( turnsToDateFraction > 0.99f ) 188 | { 189 | turnsToDateWhole += 1; 190 | turnsToDateFraction = 0; 191 | } 192 | } 193 | 194 | float turnsUsedAfterThismove = turnsToDateFraction + baseTurnsToEnterHex; // Example 0.33 + 1 195 | 196 | if(turnsUsedAfterThismove > 1) 197 | { 198 | // We have hit the situation where we don't actually have enough movement to complete this move. 199 | // What do we do? 200 | 201 | if( MOVEMENT_RULES_LIKE_CIV6 ) 202 | { 203 | // We aren't ALLOWED to enter the tile this move. That means, we have to... 204 | 205 | if(turnsToDateFraction == 0) 206 | { 207 | // We have full movement, but this isn't enough to enter the tile 208 | // EXAMPLE: We have a max move of 2 but the tile costs 3 to enter. 209 | // We are good to go. 210 | } 211 | else 212 | { 213 | // We are NOT on a fresh turn -- therefore we need to 214 | // sit idle for the remainder of this turn. 215 | turnsToDateWhole += 1; 216 | turnsToDateFraction = 0; 217 | } 218 | 219 | // So now we know for a fact that we are starting the move into difficult terrain 220 | // on a fresh turn. 221 | turnsUsedAfterThismove = baseTurnsToEnterHex; 222 | } 223 | else 224 | { 225 | // Civ5-style movement state that we can always enter a tile, even if we don't 226 | // have enough movement left. 227 | turnsUsedAfterThismove = 1; 228 | } 229 | } 230 | 231 | // turnsUsedAfterThismove is now some value from 0..1. (this includes 232 | // the factional part of moves from previous turns). 233 | 234 | 235 | // Do we return the number of turns THIS move is going to take? 236 | // I say no, this an an "aggregate" function, so return the total 237 | // turn cost of turnsToDate + turns for this move. 238 | 239 | return turnsToDateWhole + turnsUsedAfterThismove; 240 | 241 | } 242 | 243 | override public void SetHex( Hex newHex ) 244 | { 245 | if(Hex != null) 246 | { 247 | Hex.RemoveUnit(this); 248 | } 249 | 250 | base.SetHex( newHex ); 251 | 252 | Hex.AddUnit(this); 253 | } 254 | 255 | override public void Destroy( ) 256 | { 257 | base.Destroy( ); 258 | 259 | Hex.RemoveUnit(this); 260 | } 261 | 262 | /// 263 | /// Turn cost to enter a hex (i.e. 0.5 turns if a movement cost is 1 and we have 2 max movement) 264 | /// 265 | public float CostToEnterHex( IQPathTile sourceTile, IQPathTile destinationTile ) 266 | { 267 | return 1; 268 | } 269 | } 270 | -------------------------------------------------------------------------------- /Assets/Scripts/Unit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba10c9af968487b43ad82a7bdf25ea9e 3 | timeCreated: 1496943194 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/UnitView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class UnitView : MonoBehaviour { 6 | 7 | void Start() 8 | { 9 | newPosition = this.transform.position; 10 | } 11 | 12 | Vector3 newPosition; 13 | 14 | Vector3 currentVelocity; 15 | float smoothTime = 0.5f; 16 | 17 | public void OnUnitMoved( Hex oldHex, Hex newHex ) 18 | { 19 | // This GameObject is supposed to be a child of the hex we are 20 | // standing in. This ensures that we are in the correct place 21 | // in the hierachy 22 | // Our correct position when we aren't moving, is to be at 23 | // 0,0 local position relative to our parent. 24 | 25 | // TODO: Get rid of VerticalOffset and instead use a raycast to determine correct height 26 | // on each frame. 27 | 28 | Vector3 oldPosition = oldHex.PositionFromCamera(); 29 | newPosition = newHex.PositionFromCamera(); 30 | currentVelocity = Vector3.zero; 31 | 32 | // TODO: newPosition's Y component needs to be set from HexComponent's VerticalOffset 33 | oldPosition.y += oldHex.HexMap.GetHexGO(oldHex).GetComponent().VerticalOffset; 34 | newPosition.y += newHex.HexMap.GetHexGO(newHex).GetComponent().VerticalOffset; 35 | this.transform.position = oldPosition; 36 | 37 | if( Vector3.Distance(this.transform.position, newPosition) > 2 ) 38 | { 39 | // This OnUnitMoved is considerably more than the expected move 40 | // between two adjacent tiles -- it's probably a map seam thing, 41 | // so just teleport 42 | this.transform.position = newPosition; 43 | } 44 | else { 45 | // TODO: WE need a better signalling system and/or animation queueing 46 | GameObject.FindObjectOfType().AnimationIsPlaying = true; 47 | } 48 | } 49 | 50 | 51 | void Update() 52 | { 53 | 54 | this.transform.position = Vector3.SmoothDamp( this.transform.position, newPosition, ref currentVelocity, smoothTime ); 55 | 56 | // TODO: Figure out the best way to determine the end of our animation 57 | if( Vector3.Distance( this.transform.position, newPosition ) < 0.1f ) 58 | { 59 | GameObject.FindObjectOfType().AnimationIsPlaying = false; 60 | } 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /Assets/Scripts/UnitView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ced4048e0fc026e4c9336f4d43aecdd2 3 | timeCreated: 1496944944 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/SelectionController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SelectionController : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | mouseController = GameObject.FindObjectOfType(); 10 | hexMap = GameObject.FindObjectOfType(); 11 | } 12 | 13 | public GameObject UnitSelectionPanel; 14 | public GameObject CitySelectionPanel; 15 | public GameObject SelectionIndicator; 16 | HexMap hexMap; 17 | 18 | // Unit selection 19 | Unit __selectedUnit = null; 20 | public Unit SelectedUnit { 21 | get { return __selectedUnit; } 22 | set { 23 | __selectedUnit = null; 24 | if(__selectedCity != null) 25 | SelectedCity = null; 26 | 27 | __selectedUnit = value; 28 | UnitSelectionPanel.SetActive( __selectedUnit != null ); 29 | UpdateSelectionIndicator(); 30 | } 31 | } 32 | 33 | City __selectedCity = null; 34 | public City SelectedCity { 35 | get { return __selectedCity; } 36 | set { 37 | if(__selectedCity != null) 38 | { 39 | // We already have a city selected, make sure we cancel the old mouse mode 40 | mouseController.CancelUpdateFunc(); 41 | 42 | } 43 | 44 | __selectedCity = null; 45 | if(__selectedUnit != null) 46 | SelectedUnit = null; 47 | 48 | __selectedCity = value; 49 | CitySelectionPanel.SetActive( __selectedCity != null ); 50 | if(__selectedCity != null) 51 | { 52 | mouseController.StartCityView(); 53 | } 54 | } 55 | } 56 | 57 | MouseController mouseController; 58 | 59 | 60 | // Update is called once per frame 61 | void Update () { 62 | 63 | // De-select things have have been destroyed 64 | if(SelectedUnit != null && SelectedUnit.IsDestroyed == true) 65 | { 66 | // We are pointing to a destroyed unit. 67 | SelectedUnit = null; 68 | } 69 | 70 | if(SelectedCity != null && SelectedCity.IsDestroyed == true) 71 | { 72 | // We are pointing to a destroyed unit. 73 | SelectedCity = null; 74 | } 75 | 76 | UpdateSelectionIndicator(); 77 | 78 | } 79 | 80 | void UpdateSelectionIndicator() 81 | { 82 | if(SelectedUnit == null) 83 | { 84 | SelectionIndicator.SetActive(false); 85 | return; 86 | } 87 | 88 | GameObject uGO = hexMap.GetUnitGO( SelectedUnit ); 89 | if(uGO == null) 90 | { 91 | SelectedUnit = null; 92 | return; 93 | } 94 | 95 | SelectionIndicator.SetActive(true); 96 | SelectionIndicator.transform.position = uGO.transform.position; 97 | } 98 | 99 | public void SelectNextUnit( bool skipDoneUnits ) 100 | { 101 | Player player = hexMap.CurrentPlayer; 102 | 103 | Unit[] units = player.Units; 104 | 105 | int currentIndex = 0; 106 | 107 | if(SelectedUnit != null) 108 | { 109 | for (int i = 0; i < units.Length; i++) 110 | { 111 | if(SelectedUnit == units[i]) 112 | { 113 | currentIndex = i; 114 | break; 115 | } 116 | } 117 | } 118 | 119 | for (int i = 0; i < units.Length; i++) 120 | { 121 | int tryIndex = (currentIndex + i + 1) % units.Length; 122 | 123 | if ( skipDoneUnits == true && units[tryIndex].UnitWaitingForOrders() == false ) 124 | { 125 | // Skip this unit 126 | continue; 127 | } 128 | 129 | // We only get here if we're on a valid pick 130 | SelectedUnit = units[ tryIndex ]; 131 | return; 132 | } 133 | 134 | // if we got here, selection did not change 135 | // If the pre-existing unit is done, and we're suppposed to skip that, 136 | // then clear the selection. 137 | if(SelectedUnit.UnitWaitingForOrders() == false && skipDoneUnits == true) 138 | { 139 | SelectedUnit = null; 140 | } 141 | 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /Assets/SelectionController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41c1e96e36f36d44dab1d5b0f6e39181 3 | timeCreated: 1504973620 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/TurnNumberText.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class TurnNumberText : MonoBehaviour { 7 | 8 | // Use this for initialization 9 | void Start () { 10 | hexMap = GameObject.FindObjectOfType(); 11 | text = GetComponent(); 12 | } 13 | 14 | HexMap hexMap; 15 | Text text; 16 | 17 | // Update is called once per frame 18 | void Update () { 19 | text.text = "Turn: " + hexMap.TurnNumber; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/TurnNumberText.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7dcb996e72502f4ebb89b0c27797689 3 | timeCreated: 1504980116 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/UI Images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b6b47be62a5adb4688d1f07b73963c1 3 | folderAsset: yes 4 | timeCreated: 1499963142 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UI Images/blue_button00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/UI Images/blue_button00.png -------------------------------------------------------------------------------- /Assets/UI Images/blue_button00.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac63bd9557ef5164d896ea23cb8f6fdd 3 | timeCreated: 1499963164 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: 1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 1 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | - buildTarget: Android 75 | maxTextureSize: 2048 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | - buildTarget: WebGL 83 | maxTextureSize: 2048 84 | textureFormat: -1 85 | textureCompression: 1 86 | compressionQuality: 50 87 | crunchedCompression: 0 88 | allowsAlphaSplitting: 0 89 | overridden: 0 90 | spriteSheet: 91 | serializedVersion: 2 92 | sprites: [] 93 | outline: [] 94 | physicsShape: [] 95 | spritePackingTag: 96 | userData: 97 | assetBundleName: 98 | assetBundleVariant: 99 | -------------------------------------------------------------------------------- /Assets/UI Images/blue_button01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/UI Images/blue_button01.png -------------------------------------------------------------------------------- /Assets/UI Images/blue_button01.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53c34fc99bee6b047b2e4a8b14ebc99d 3 | timeCreated: 1499963164 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: 1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 1 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | - buildTarget: Android 75 | maxTextureSize: 2048 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | - buildTarget: WebGL 83 | maxTextureSize: 2048 84 | textureFormat: -1 85 | textureCompression: 1 86 | compressionQuality: 50 87 | crunchedCompression: 0 88 | allowsAlphaSplitting: 0 89 | overridden: 0 90 | spriteSheet: 91 | serializedVersion: 2 92 | sprites: [] 93 | outline: [] 94 | physicsShape: [] 95 | spritePackingTag: 96 | userData: 97 | assetBundleName: 98 | assetBundleVariant: 99 | -------------------------------------------------------------------------------- /Assets/UI Images/blue_button02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/UI Images/blue_button02.png -------------------------------------------------------------------------------- /Assets/UI Images/blue_button02.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91055cd07c4fd3f41bf5251a2eabb6d0 3 | timeCreated: 1499963164 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: 1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 1 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | - buildTarget: Android 75 | maxTextureSize: 2048 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | - buildTarget: WebGL 83 | maxTextureSize: 2048 84 | textureFormat: -1 85 | textureCompression: 1 86 | compressionQuality: 50 87 | crunchedCompression: 0 88 | allowsAlphaSplitting: 0 89 | overridden: 0 90 | spriteSheet: 91 | serializedVersion: 2 92 | sprites: [] 93 | outline: [] 94 | physicsShape: [] 95 | spritePackingTag: 96 | userData: 97 | assetBundleName: 98 | assetBundleVariant: 99 | -------------------------------------------------------------------------------- /Assets/UI Images/blue_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/UI Images/blue_circle.png -------------------------------------------------------------------------------- /Assets/UI Images/blue_circle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aef382c52e8e7494bb69ff359e8d5de5 3 | timeCreated: 1499963343 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: 1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 1 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | - buildTarget: Android 75 | maxTextureSize: 2048 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | - buildTarget: WebGL 83 | maxTextureSize: 2048 84 | textureFormat: -1 85 | textureCompression: 1 86 | compressionQuality: 50 87 | crunchedCompression: 0 88 | allowsAlphaSplitting: 0 89 | overridden: 0 90 | spriteSheet: 91 | serializedVersion: 2 92 | sprites: [] 93 | outline: [] 94 | physicsShape: [] 95 | spritePackingTag: 96 | userData: 97 | assetBundleName: 98 | assetBundleVariant: 99 | -------------------------------------------------------------------------------- /Assets/UI Images/blue_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/UI Images/blue_panel.png -------------------------------------------------------------------------------- /Assets/UI Images/blue_panel.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e432095f78ed4ed4b8a1db95330ad2f9 3 | timeCreated: 1499963547 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: 1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 1 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 6, y: 6, z: 6, w: 6} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | - buildTarget: Android 75 | maxTextureSize: 2048 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | - buildTarget: WebGL 83 | maxTextureSize: 2048 84 | textureFormat: -1 85 | textureCompression: 1 86 | compressionQuality: 50 87 | crunchedCompression: 0 88 | allowsAlphaSplitting: 0 89 | overridden: 0 90 | spriteSheet: 91 | serializedVersion: 2 92 | sprites: [] 93 | outline: [] 94 | physicsShape: [] 95 | spritePackingTag: 96 | userData: 97 | assetBundleName: 98 | assetBundleVariant: 99 | -------------------------------------------------------------------------------- /Assets/_SCENE_.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7359023b35b23954aa0a52e2b29fca6b 3 | folderAsset: yes 4 | timeCreated: 1503157402 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/_SCENE_.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/_SCENE_.unity -------------------------------------------------------------------------------- /Assets/_SCENE_.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b63b9aad0efbef545a325aa1ac53f10f 3 | timeCreated: 1493916394 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_SCENE_/LightingData.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/_SCENE_/LightingData.asset -------------------------------------------------------------------------------- /Assets/_SCENE_/LightingData.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cdaf1989a9757341928c25fdb369568 3 | timeCreated: 1503157402 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 25800000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/_SCENE_/ReflectionProbe-0.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/Assets/_SCENE_/ReflectionProbe-0.exr -------------------------------------------------------------------------------- /Assets/_SCENE_/ReflectionProbe-0.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d42e05f256b86d4d8c17093db3bc8ea 3 | timeCreated: 1503157402 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: 7 | 8900000: generatedCubemap 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 1 29 | seamlessCubemap: 1 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 2 35 | aniso: 0 36 | mipBias: 0 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 2 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | textureFormat: -1 62 | textureCompression: 1 63 | compressionQuality: 100 64 | crunchedCompression: 0 65 | allowsAlphaSplitting: 0 66 | overridden: 0 67 | spriteSheet: 68 | serializedVersion: 2 69 | sprites: [] 70 | outline: [] 71 | physicsShape: [] 72 | spritePackingTag: 73 | userData: 74 | assetBundleName: 75 | assetBundleVariant: 76 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Martin "quill18" Glaude 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.1.0f3 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quill18/MostlyCivilizedHexEngine/70aef30123946ffc5fa0b91452acd1fffc0f1524/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MostlyCivilizedHexEngine 2 | 3 | MostlyCivilizedHexEngine is designed to be an educational project to teach people 4 | how to produce a mutli-featured and semi-complete turn-based strategy game with a 5 | hex-tile map. 6 | 7 | The content found in this repository was produced over a series of tutorial videos, 8 | which you can watch here: 9 | https://www.youtube.com/playlist?list=PLbghT7MmckI7JHf0pdEQ8fbPb-LoDXEno 10 | 11 | ## Software Requirements 12 | 13 | The most recent changes to this project were made in Unity 2017, but any Unity version 14 | from 5.0 forward should be able to compile this project successfully. 15 | 16 | ## Copyright & Licensing 17 | 18 | The base project code is copyrighted by Martin "quill18" Glaude and 19 | is covered by multiple licenses. 20 | 21 | All program code (i.e. C#, Lua, XML) is licensed under the MIT License unless otherwise 22 | specified. Please see the "LICENSE" file for more information. 23 | 24 | All non-code assets (e.g. art, sound) is licensed under CC BY-NC-SA 3.0 25 | (Attribution-NonCommercial-ShareAlike 3.0 Unported) unless otherwise specified. 26 | 27 | ## Contact 28 | 29 | You can contact Quill18 by Twitter (@quill18) or email: 30 | quill18@quill18.com 31 | 32 | However, please note that Quill receives a lot of email and may 33 | not be able to respond to everyone in a timely manner. 34 | 35 | --------------------------------------------------------------------------------