diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj new file mode 100644 index 0000000..a77f0bc --- /dev/null +++ b/Assembly-CSharp.csproj @@ -0,0 +1,90 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + + {8BDBDF9F-FEF3-7D2C-8E29-2D8DF4A1F275} + Library + Properties + Assembly-CSharp + v3.5 + 512 + Assets + + + true + full + false + Temp\bin\Debug\ + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_4_0;UNITY_5_4;UNITY_5;UNITY_64;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_EDITOR_RETINA;ENABLE_RETINA_GUISTYLES;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;UNITY_TEAM_LICENSE + prompt + 4 + 0169 + + + pdbonly + true + Temp\bin\Release\ + prompt + 4 + 0169 + + + + + + + + /Applications/Unity/Unity.app/Contents/Managed/UnityEngine.dll + + + /Applications/Unity/Unity.app/Contents/Managed/UnityEditor.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll + + + /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll + + + + + + diff --git a/Assets/Ammo.meta b/Assets/Ammo.meta new file mode 100644 index 0000000..22d0847 --- /dev/null +++ b/Assets/Ammo.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7433efef799ad4b2bb190a862dc90cf9 +folderAsset: yes +timeCreated: 1511042635 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings.meta b/Assets/Buildings.meta new file mode 100644 index 0000000..0eb06c1 --- /dev/null +++ b/Assets/Buildings.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fffe1a6eeba1b4ee797e82a840e8d257 +folderAsset: yes +timeCreated: 1509324871 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/Building.cs b/Assets/Buildings/Building.cs new file mode 100644 index 0000000..0348f9a --- /dev/null +++ b/Assets/Buildings/Building.cs @@ -0,0 +1,113 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using RTS; + +public class Building : RTSObject { + public Unit[] buildableUnits; + private Dictionary units; + public float maxBuildProgress; + protected Queue< Unit > buildQueue; + private float currentBuildProgress = 0.0f; + private Vector3 spawnPoint; + private bool needsBuilding; + + + public int startBelow; + private Vector3 startSpawnPoint; + public Vector3 endSpawnPoint; + + private float currentTime = 0.0f; + public bool constructing; + + + protected override void Awake() { + base.Awake(); + Debug.Log (objectName); + buildQueue = new Queue< Unit >(); + float spawnX = selectionBounds.center.x + transform.forward.x * selectionBounds.extents.x + transform.forward.x * 10; + float spawnZ = selectionBounds.center.z + transform.forward.z + selectionBounds.extents.z + transform.forward.z * 10; + spawnPoint = new Vector3 (spawnX, 0.0f, spawnZ); + units = new Dictionary (); + for (int i = 0; i < buildableUnits.Length; i++) { + Unit buildableUnit = buildableUnits [i]; + units.Add (buildableUnit.objectName, buildableUnit); + } + endSpawnPoint = transform.position; + transform.position = new Vector3(transform.position.x, startBelow, transform.position.z); + constructing = true; + startSpawnPoint = transform.position; + } + + protected override void Start () { + base.Start(); + + + } + + protected override void Update () { + base.Update(); + if (!constructing) { + ProcessBuildQueue (); + } else { + Construct (); + } + + } + + protected override void OnGUI() { + base.OnGUI(); + } + + protected void CreateUnit(string unitName) { + if (units.ContainsKey(unitName)) { + buildQueue.Enqueue(units[unitName]); + Debug.Log (unitName); + } + } + protected void ProcessBuildQueue() { + if(buildQueue.Count > 0) { + maxBuildProgress = buildQueue.Peek ().buildTime; + currentBuildProgress += Time.deltaTime * ResourceManager.BuildSpeed; + if(currentBuildProgress >= maxBuildProgress) { + InstantiateUnit (); + currentBuildProgress = 0.0f; + } + } + } + protected virtual void InstantiateUnit() { + if(player) player.AddUnit(buildQueue.Dequeue(), spawnPoint, transform.rotation); + } + public string[] getBuildQueueValues() { + string[] values = new string[buildQueue.Count]; + int pos=0; + foreach(Unit unit in buildQueue) values[pos++] = unit.objectName; + return values; + } + + public float getBuildPercentage() { + return currentBuildProgress / maxBuildProgress; + } + public void StartConstruction() { + CalculateBounds(); + needsBuilding = true; + hitPoints = 0; + } + + public bool UnderConstruction() { + return needsBuilding; + } + + protected void Construct () { + if (constructing) { + if (transform.position == endSpawnPoint) { + constructing = false; + } else { + currentTime += Time.deltaTime; + float timeRatio = currentTime / buildTime; + transform.position = Vector3.Lerp (startSpawnPoint, endSpawnPoint, timeRatio); + + } + } + } +} diff --git a/Assets/Buildings/Building.cs.meta b/Assets/Buildings/Building.cs.meta new file mode 100644 index 0000000..440b0b6 --- /dev/null +++ b/Assets/Buildings/Building.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 046c336c75b6948e1ba7b23affa8b1c5 +timeCreated: 1508371302 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/Buildings.cs b/Assets/Buildings/Buildings.cs new file mode 100644 index 0000000..ab9b398 --- /dev/null +++ b/Assets/Buildings/Buildings.cs @@ -0,0 +1,6 @@ +using UnityEngine; +using System.Collections; + +public class Buildings : MonoBehaviour { + //wrapper class for unit listing for a player +} diff --git a/Assets/Buildings/Buildings.cs.meta b/Assets/Buildings/Buildings.cs.meta new file mode 100644 index 0000000..a26f976 --- /dev/null +++ b/Assets/Buildings/Buildings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b975734732e2f4bb8a966f5512faebf7 +timeCreated: 1509405958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/Capacitor.meta b/Assets/Buildings/Capacitor.meta new file mode 100644 index 0000000..19cf673 --- /dev/null +++ b/Assets/Buildings/Capacitor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e9ad14f150efc468cb084ceda09b7e8f +folderAsset: yes +timeCreated: 1509551344 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/Capacitor/Capacitor.cs b/Assets/Buildings/Capacitor/Capacitor.cs new file mode 100644 index 0000000..7ea3706 --- /dev/null +++ b/Assets/Buildings/Capacitor/Capacitor.cs @@ -0,0 +1,65 @@ +using UnityEngine; +using System.Collections; +using RTS; +public class Capacitor : Building { + + public int addedCapacitanceLimit; + public Vector3 center; + public float radius; + private float angle; + public int maxWorkers; + private int currentworkers; + private Vector3 currentpoint; + private float step; + protected override void Awake() { + base.Awake (); + + + } + + protected override void Start () { + base.Start (); + player.addResourceLimit (ResourceType.Capacitance, addedCapacitanceLimit); + center = transform.position; + step = 2 * Mathf.PI / maxWorkers; + angle = 0; + currentworkers = transform.childCount; + currentpoint = new Vector3 (center.x + radius, center.y, center.z + radius); + CreateUnit ("Worker"); + CreateUnit ("Worker"); + CreateUnit ("Worker"); + CreateUnit ("Worker"); + CreateUnit ("Worker"); + CreateUnit ("Worker"); + } + + protected override void Update () { + base.Update (); + if (!constructing) { + } + } + + protected override void OnGUI() { + base.OnGUI (); + } + protected override void OnDestroy() { + player.addResourceLimit (ResourceType.Capacitance, addedCapacitanceLimit * -1); + } + + public void addResource(ResourceType resourceName, int value) { + player.addResource (resourceName, value); + } + public void addResourceLimit (ResourceType resourceName, int value) { + player.addResourceLimit (resourceName, value); + } + protected override void InstantiateUnit() { + if (currentworkers < maxWorkers) { + angle += step; + Vector3 offset = new Vector3 (Mathf.Sin (angle) * radius, 0, Mathf.Cos (angle) * radius); + currentpoint = center + offset; + Unit newUnit = Instantiate (buildQueue.Dequeue (), currentpoint, transform.rotation) as Unit; + newUnit.transform.parent = this.transform; + currentworkers++; + } + } +} diff --git a/Assets/Buildings/Capacitor/Capacitor.cs.meta b/Assets/Buildings/Capacitor/Capacitor.cs.meta new file mode 100644 index 0000000..4e98bba --- /dev/null +++ b/Assets/Buildings/Capacitor/Capacitor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2d4ef8d6c2af64f86980ded3b9c711d6 +timeCreated: 1509551365 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/Capacitor/Capacitor.prefab b/Assets/Buildings/Capacitor/Capacitor.prefab new file mode 100644 index 0000000..df7d993 Binary files /dev/null and b/Assets/Buildings/Capacitor/Capacitor.prefab differ diff --git a/Assets/Buildings/Capacitor/Capacitor.prefab.meta b/Assets/Buildings/Capacitor/Capacitor.prefab.meta new file mode 100644 index 0000000..951cb71 --- /dev/null +++ b/Assets/Buildings/Capacitor/Capacitor.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71a3a0d7bcf644a77a500b53be83b877 +timeCreated: 1509551587 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/WarFactory.meta b/Assets/Buildings/WarFactory.meta new file mode 100644 index 0000000..b3b7f0f --- /dev/null +++ b/Assets/Buildings/WarFactory.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ce520b719d0cb4b65beadff34996fd33 +folderAsset: yes +timeCreated: 1509324920 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/WarFactory/WarFactory.cs b/Assets/Buildings/WarFactory/WarFactory.cs new file mode 100644 index 0000000..c807818 --- /dev/null +++ b/Assets/Buildings/WarFactory/WarFactory.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using System.Collections; + +public class WarFactory : Building { + + + protected override void Start () { + base.Start(); + } + + protected override void Update() { + base.Update (); + } + protected override void InstantiateUnit() { + base.InstantiateUnit (); + } +} diff --git a/Assets/Buildings/WarFactory/WarFactory.cs.meta b/Assets/Buildings/WarFactory/WarFactory.cs.meta new file mode 100644 index 0000000..36a6af2 --- /dev/null +++ b/Assets/Buildings/WarFactory/WarFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d8950ba5c96c64341b2a70dd01ba5e03 +timeCreated: 1509324384 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/WarFactory/WarFactory.prefab b/Assets/Buildings/WarFactory/WarFactory.prefab new file mode 100644 index 0000000..a0b0608 Binary files /dev/null and b/Assets/Buildings/WarFactory/WarFactory.prefab differ diff --git a/Assets/Buildings/WarFactory/WarFactory.prefab.meta b/Assets/Buildings/WarFactory/WarFactory.prefab.meta new file mode 100644 index 0000000..7938951 --- /dev/null +++ b/Assets/Buildings/WarFactory/WarFactory.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b756ecf64388045e1b8893cf5da7660a +timeCreated: 1509325048 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/WarFactory/WarFactoryButton.prefab b/Assets/Buildings/WarFactory/WarFactoryButton.prefab new file mode 100644 index 0000000..ce8f9f3 Binary files /dev/null and b/Assets/Buildings/WarFactory/WarFactoryButton.prefab differ diff --git a/Assets/Buildings/WarFactory/WarFactoryButton.prefab.meta b/Assets/Buildings/WarFactory/WarFactoryButton.prefab.meta new file mode 100644 index 0000000..a1dfae7 --- /dev/null +++ b/Assets/Buildings/WarFactory/WarFactoryButton.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4da7d30a027a24739af42f29111c4803 +timeCreated: 1511482209 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Buildings/WarFactory/warfactory.png b/Assets/Buildings/WarFactory/warfactory.png new file mode 100644 index 0000000..dc9db73 Binary files /dev/null and b/Assets/Buildings/WarFactory/warfactory.png differ diff --git a/Assets/Buildings/WarFactory/warfactory.png.meta b/Assets/Buildings/WarFactory/warfactory.png.meta new file mode 100644 index 0000000..5898d3f --- /dev/null +++ b/Assets/Buildings/WarFactory/warfactory.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: c526d21f1f750438daeb41307e9a5d7d +timeCreated: 1509325130 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons.meta b/Assets/Icons.meta new file mode 100644 index 0000000..b74a76f --- /dev/null +++ b/Assets/Icons.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 10870c9cc1e81412dac3c22fbdf47900 +folderAsset: yes +timeCreated: 1509324570 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/BuildingIcons.meta b/Assets/Icons/BuildingIcons.meta new file mode 100644 index 0000000..ad038bf --- /dev/null +++ b/Assets/Icons/BuildingIcons.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1745b7819bb1d46aab3ad64e2e2c6514 +folderAsset: yes +timeCreated: 1509324592 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors.meta b/Assets/Icons/Cursors.meta new file mode 100644 index 0000000..fb67204 --- /dev/null +++ b/Assets/Icons/Cursors.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 414f26505c5a348b59bb79a33465f010 +folderAsset: yes +timeCreated: 1509225648 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Attack.meta b/Assets/Icons/Cursors/Attack.meta new file mode 100644 index 0000000..1767fcf --- /dev/null +++ b/Assets/Icons/Cursors/Attack.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 39329a6567aee4ba0879ba92e8f385f7 +folderAsset: yes +timeCreated: 1509225675 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Attack/attack1.png b/Assets/Icons/Cursors/Attack/attack1.png new file mode 100644 index 0000000..1ce318e Binary files /dev/null and b/Assets/Icons/Cursors/Attack/attack1.png differ diff --git a/Assets/Icons/Cursors/Attack/attack1.png.meta b/Assets/Icons/Cursors/Attack/attack1.png.meta new file mode 100644 index 0000000..39732af --- /dev/null +++ b/Assets/Icons/Cursors/Attack/attack1.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 40761035a5ce14bf7ae798ef306e2016 +timeCreated: 1509225754 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Attack/attack2.png b/Assets/Icons/Cursors/Attack/attack2.png new file mode 100644 index 0000000..1de11ca Binary files /dev/null and b/Assets/Icons/Cursors/Attack/attack2.png differ diff --git a/Assets/Icons/Cursors/Attack/attack2.png.meta b/Assets/Icons/Cursors/Attack/attack2.png.meta new file mode 100644 index 0000000..a6ba8de --- /dev/null +++ b/Assets/Icons/Cursors/Attack/attack2.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 6d9a24c81aa2a4cd68ac2af89ad75e0f +timeCreated: 1509225754 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Gather.meta b/Assets/Icons/Cursors/Gather.meta new file mode 100644 index 0000000..d7e857c --- /dev/null +++ b/Assets/Icons/Cursors/Gather.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8c097f4296f474ee39c3440f04ad7da1 +folderAsset: yes +timeCreated: 1509225688 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Gather/harvest.png b/Assets/Icons/Cursors/Gather/harvest.png new file mode 100644 index 0000000..a9db421 Binary files /dev/null and b/Assets/Icons/Cursors/Gather/harvest.png differ diff --git a/Assets/Icons/Cursors/Gather/harvest.png.meta b/Assets/Icons/Cursors/Gather/harvest.png.meta new file mode 100644 index 0000000..fe00298 --- /dev/null +++ b/Assets/Icons/Cursors/Gather/harvest.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 453e0b0e3eef647ba820f6af5681c9cf +timeCreated: 1509225748 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Gather/harvest2.png b/Assets/Icons/Cursors/Gather/harvest2.png new file mode 100644 index 0000000..744d0b2 Binary files /dev/null and b/Assets/Icons/Cursors/Gather/harvest2.png differ diff --git a/Assets/Icons/Cursors/Gather/harvest2.png.meta b/Assets/Icons/Cursors/Gather/harvest2.png.meta new file mode 100644 index 0000000..fd8110b --- /dev/null +++ b/Assets/Icons/Cursors/Gather/harvest2.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 030f5f0cf12084d1687e8b3b01e98e82 +timeCreated: 1509225748 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Move.meta b/Assets/Icons/Cursors/Move.meta new file mode 100644 index 0000000..5fc0505 --- /dev/null +++ b/Assets/Icons/Cursors/Move.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 32108e8d69513470187d5ae741b35743 +folderAsset: yes +timeCreated: 1509225668 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Move/move1.png b/Assets/Icons/Cursors/Move/move1.png new file mode 100644 index 0000000..264f10a Binary files /dev/null and b/Assets/Icons/Cursors/Move/move1.png differ diff --git a/Assets/Icons/Cursors/Move/move1.png.meta b/Assets/Icons/Cursors/Move/move1.png.meta new file mode 100644 index 0000000..fd9539a --- /dev/null +++ b/Assets/Icons/Cursors/Move/move1.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: a3f07e40ccbb24752b0a7217781b8bc8 +timeCreated: 1509225738 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Move/move2.png b/Assets/Icons/Cursors/Move/move2.png new file mode 100644 index 0000000..af3c643 Binary files /dev/null and b/Assets/Icons/Cursors/Move/move2.png differ diff --git a/Assets/Icons/Cursors/Move/move2.png.meta b/Assets/Icons/Cursors/Move/move2.png.meta new file mode 100644 index 0000000..aff9b33 --- /dev/null +++ b/Assets/Icons/Cursors/Move/move2.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: b5cb050f9f453469ba1f4cce40c7544e +timeCreated: 1509225734 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Pan.meta b/Assets/Icons/Cursors/Pan.meta new file mode 100644 index 0000000..7e4eeea --- /dev/null +++ b/Assets/Icons/Cursors/Pan.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bacaecd2b9fec4e9c9cde1b90144cb3c +folderAsset: yes +timeCreated: 1509225664 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Pan/pandown.png b/Assets/Icons/Cursors/Pan/pandown.png new file mode 100644 index 0000000..90ff1bc Binary files /dev/null and b/Assets/Icons/Cursors/Pan/pandown.png differ diff --git a/Assets/Icons/Cursors/Pan/pandown.png.meta b/Assets/Icons/Cursors/Pan/pandown.png.meta new file mode 100644 index 0000000..dcd8a75 --- /dev/null +++ b/Assets/Icons/Cursors/Pan/pandown.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 9355bf1f0100d4d3482ce4c1b7a684be +timeCreated: 1509225726 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Pan/panleft.png b/Assets/Icons/Cursors/Pan/panleft.png new file mode 100644 index 0000000..41ce57f Binary files /dev/null and b/Assets/Icons/Cursors/Pan/panleft.png differ diff --git a/Assets/Icons/Cursors/Pan/panleft.png.meta b/Assets/Icons/Cursors/Pan/panleft.png.meta new file mode 100644 index 0000000..921cc74 --- /dev/null +++ b/Assets/Icons/Cursors/Pan/panleft.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 7d122ed2eb4aa421298a03d9c6c6ec7d +timeCreated: 1509225723 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Pan/panright.png b/Assets/Icons/Cursors/Pan/panright.png new file mode 100644 index 0000000..929fd0b Binary files /dev/null and b/Assets/Icons/Cursors/Pan/panright.png differ diff --git a/Assets/Icons/Cursors/Pan/panright.png.meta b/Assets/Icons/Cursors/Pan/panright.png.meta new file mode 100644 index 0000000..872850c --- /dev/null +++ b/Assets/Icons/Cursors/Pan/panright.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 16d6d77c2d3954e8282f55bc2a2563ec +timeCreated: 1509225719 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/Pan/panup.png b/Assets/Icons/Cursors/Pan/panup.png new file mode 100644 index 0000000..3e9c663 Binary files /dev/null and b/Assets/Icons/Cursors/Pan/panup.png differ diff --git a/Assets/Icons/Cursors/Pan/panup.png.meta b/Assets/Icons/Cursors/Pan/panup.png.meta new file mode 100644 index 0000000..8d5ed4f --- /dev/null +++ b/Assets/Icons/Cursors/Pan/panup.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 3e2c946499c2b4f6f8569782c8f4fc9f +timeCreated: 1509225730 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/Cursors/select.png b/Assets/Icons/Cursors/select.png new file mode 100644 index 0000000..ad3c707 Binary files /dev/null and b/Assets/Icons/Cursors/select.png differ diff --git a/Assets/Icons/Cursors/select.png.meta b/Assets/Icons/Cursors/select.png.meta new file mode 100644 index 0000000..a31db8b --- /dev/null +++ b/Assets/Icons/Cursors/select.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: d9666d9e6b6f04db4a2e93c0b60cdb9d +timeCreated: 1509225715 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/ResourceIcons.meta b/Assets/Icons/ResourceIcons.meta new file mode 100644 index 0000000..5e7aed7 --- /dev/null +++ b/Assets/Icons/ResourceIcons.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 40640bf8ac6864a3387680d240164b95 +folderAsset: yes +timeCreated: 1509306785 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/ResourceIcons/Money.png b/Assets/Icons/ResourceIcons/Money.png new file mode 100644 index 0000000..6590712 Binary files /dev/null and b/Assets/Icons/ResourceIcons/Money.png differ diff --git a/Assets/Icons/ResourceIcons/Money.png.meta b/Assets/Icons/ResourceIcons/Money.png.meta new file mode 100644 index 0000000..11da720 --- /dev/null +++ b/Assets/Icons/ResourceIcons/Money.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 36f88b84c4eba46feb201b21cbc2c4db +timeCreated: 1509306792 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/ResourceIcons/Power.png b/Assets/Icons/ResourceIcons/Power.png new file mode 100644 index 0000000..336a3af Binary files /dev/null and b/Assets/Icons/ResourceIcons/Power.png differ diff --git a/Assets/Icons/ResourceIcons/Power.png.meta b/Assets/Icons/ResourceIcons/Power.png.meta new file mode 100644 index 0000000..ae9860c --- /dev/null +++ b/Assets/Icons/ResourceIcons/Power.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 19329ca7d52b746dc833569a0031bdc5 +timeCreated: 1509306789 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/UnitIcons.meta b/Assets/Icons/UnitIcons.meta new file mode 100644 index 0000000..e8960a1 --- /dev/null +++ b/Assets/Icons/UnitIcons.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 87ae53933f9704defb9a2e8832af01d9 +folderAsset: yes +timeCreated: 1509324795 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/buildframe.png b/Assets/Icons/buildframe.png new file mode 100644 index 0000000..2dc3dcd Binary files /dev/null and b/Assets/Icons/buildframe.png differ diff --git a/Assets/Icons/buildframe.png.meta b/Assets/Icons/buildframe.png.meta new file mode 100644 index 0000000..1a02818 --- /dev/null +++ b/Assets/Icons/buildframe.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 23afce5f04ec14c40aa015c97a1164d0 +timeCreated: 1509407213 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/buildmask.png b/Assets/Icons/buildmask.png new file mode 100644 index 0000000..f38ddb2 Binary files /dev/null and b/Assets/Icons/buildmask.png differ diff --git a/Assets/Icons/buildmask.png.meta b/Assets/Icons/buildmask.png.meta new file mode 100644 index 0000000..3f8d4db --- /dev/null +++ b/Assets/Icons/buildmask.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 49472c24b13134d74b7ca12587117475 +timeCreated: 1509407542 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/buttonclick.png b/Assets/Icons/buttonclick.png new file mode 100644 index 0000000..6eb7706 Binary files /dev/null and b/Assets/Icons/buttonclick.png differ diff --git a/Assets/Icons/buttonclick.png.meta b/Assets/Icons/buttonclick.png.meta new file mode 100644 index 0000000..042fc1d --- /dev/null +++ b/Assets/Icons/buttonclick.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 707939f1d8b3d4e5b81e992220b77ff5 +timeCreated: 1509404512 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/buttonhover.png b/Assets/Icons/buttonhover.png new file mode 100644 index 0000000..1a9d2ce Binary files /dev/null and b/Assets/Icons/buttonhover.png differ diff --git a/Assets/Icons/buttonhover.png.meta b/Assets/Icons/buttonhover.png.meta new file mode 100644 index 0000000..1dce644 --- /dev/null +++ b/Assets/Icons/buttonhover.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: d96274e78a6534450bba4712e4dc0856 +timeCreated: 1509404520 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/selectionBox.guiskin b/Assets/Icons/selectionBox.guiskin new file mode 100644 index 0000000..4faf80c Binary files /dev/null and b/Assets/Icons/selectionBox.guiskin differ diff --git a/Assets/Icons/selectionBox.guiskin.meta b/Assets/Icons/selectionBox.guiskin.meta new file mode 100644 index 0000000..181908a --- /dev/null +++ b/Assets/Icons/selectionBox.guiskin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4cdb103056fef4dc4af80980dcb46028 +timeCreated: 1509207942 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Icons/selectionbox.png b/Assets/Icons/selectionbox.png new file mode 100644 index 0000000..0483486 Binary files /dev/null and b/Assets/Icons/selectionbox.png differ diff --git a/Assets/Icons/selectionbox.png.meta b/Assets/Icons/selectionbox.png.meta new file mode 100644 index 0000000..36e5f3a --- /dev/null +++ b/Assets/Icons/selectionbox.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: ee62e3d13452f404f8baa4ee50c864c1 +timeCreated: 1509207917 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Player.meta b/Assets/Player.meta new file mode 100644 index 0000000..a0d0a05 --- /dev/null +++ b/Assets/Player.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ff98112a9c1f643398c695c8b4e7a722 +folderAsset: yes +timeCreated: 1509413580 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Player/Computer.prefab b/Assets/Player/Computer.prefab new file mode 100644 index 0000000..0da4d50 Binary files /dev/null and b/Assets/Player/Computer.prefab differ diff --git a/Assets/Player/Computer.prefab.meta b/Assets/Player/Computer.prefab.meta new file mode 100644 index 0000000..776e037 --- /dev/null +++ b/Assets/Player/Computer.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 832f347a42c304be69d764a5c58b0bca +timeCreated: 1509552627 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Player/Human.prefab b/Assets/Player/Human.prefab new file mode 100644 index 0000000..93f0030 Binary files /dev/null and b/Assets/Player/Human.prefab differ diff --git a/Assets/Player/Human.prefab.meta b/Assets/Player/Human.prefab.meta new file mode 100644 index 0000000..f8b381c --- /dev/null +++ b/Assets/Player/Human.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1d161fc93606a4f05981e057bdabfe25 +timeCreated: 1509413585 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Player/Player.cs b/Assets/Player/Player.cs new file mode 100644 index 0000000..dbd3315 --- /dev/null +++ b/Assets/Player/Player.cs @@ -0,0 +1,52 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using RTS; +public class Player : MonoBehaviour { + + public string username; + public bool human; + public HUD hud; + public RTSObject SelectedObject; + public int startPower, startCapacitance, startPowerLimit, startCapacitanceLimit; + public Dictionary< ResourceType, int > resources, resourceLimits; + public Color teamColor; + // Use this for initialization + void Awake () { + if (human) { + hud = GetComponentInChildren< HUD > (); + } + resources = InitResourceTypeList (startPower, startCapacitance); + resourceLimits = InitResourceTypeList (startPowerLimit, startCapacitanceLimit); + } + void Update () { + } + private Dictionary< ResourceType, int > InitResourceTypeList(int p, int c) { + Dictionary< ResourceType, int > list = new Dictionary< ResourceType, int >(); + list.Add(ResourceType.Power, p); + list.Add (ResourceType.Capacitance, c); + return list; + + } + public bool addResource(ResourceType resourceName, int value) { + int currentResourceValue = resources [resourceName]; + int resourceLimit = resourceLimits [resourceName]; + if ( (currentResourceValue + value <= resourceLimit) || (resourceName == ResourceType.Power) ) { + + resources [resourceName] += value; + return true; + } + return false; + + } + public void addResourceLimit(ResourceType resourceName, int value) { + resourceLimits [ResourceType.Capacitance] += value; + } + + public void AddUnit(Unit unit, Vector3 spawnPoint, Quaternion rotation) { + Units myUnits = GetComponentInChildren< Units >(); + Unit newUnit = Instantiate(unit, spawnPoint, rotation) as Unit; + newUnit.transform.parent = myUnits.transform; + } + +} diff --git a/Assets/Player/Player.cs.meta b/Assets/Player/Player.cs.meta new file mode 100644 index 0000000..fe4b4c2 --- /dev/null +++ b/Assets/Player/Player.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 661281be59945457f9b4a2e1ffb70747 +timeCreated: 1507765087 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/RTSTest.meta b/Assets/RTSTest.meta new file mode 100644 index 0000000..e3e565c --- /dev/null +++ b/Assets/RTSTest.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a93351d85bf414a9396c19045c26ebaf +folderAsset: yes +timeCreated: 1510521998 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/RTSTest.unity b/Assets/RTSTest.unity new file mode 100644 index 0000000..91d0871 Binary files /dev/null and b/Assets/RTSTest.unity differ diff --git a/Assets/RTSTest.unity.meta b/Assets/RTSTest.unity.meta new file mode 100644 index 0000000..009cbe0 --- /dev/null +++ b/Assets/RTSTest.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 896a4e12fe2794c20ac95dc16cb1a105 +timeCreated: 1509640032 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/RTSTest/NavMesh.asset b/Assets/RTSTest/NavMesh.asset new file mode 100644 index 0000000..ad51b96 Binary files /dev/null and b/Assets/RTSTest/NavMesh.asset differ diff --git a/Assets/RTSTest/NavMesh.asset.meta b/Assets/RTSTest/NavMesh.asset.meta new file mode 100644 index 0000000..5032a0d --- /dev/null +++ b/Assets/RTSTest/NavMesh.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: af9648ff4bb1a4caba7dfd9d146802a6 +timeCreated: 1510523253 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Skins.meta b/Assets/Skins.meta new file mode 100644 index 0000000..039773f --- /dev/null +++ b/Assets/Skins.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ef53562830f96472f92cc43ba5e86099 +folderAsset: yes +timeCreated: 1508101014 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Skins/ordersBar.guiskin b/Assets/Skins/ordersBar.guiskin new file mode 100644 index 0000000..01b19ca Binary files /dev/null and b/Assets/Skins/ordersBar.guiskin differ diff --git a/Assets/Skins/ordersBar.guiskin.meta b/Assets/Skins/ordersBar.guiskin.meta new file mode 100644 index 0000000..bb5967a --- /dev/null +++ b/Assets/Skins/ordersBar.guiskin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 531fad4ca8f4047358c260f83affb005 +timeCreated: 1508101121 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Skins/ordersBar.png b/Assets/Skins/ordersBar.png new file mode 100644 index 0000000..608484b Binary files /dev/null and b/Assets/Skins/ordersBar.png differ diff --git a/Assets/Skins/ordersBar.png.meta b/Assets/Skins/ordersBar.png.meta new file mode 100644 index 0000000..60ecf4c --- /dev/null +++ b/Assets/Skins/ordersBar.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: ab6d8acd8fb99431eb5b97ab7a410a1b +timeCreated: 1508101024 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Skins/resourceBar.guiskin b/Assets/Skins/resourceBar.guiskin new file mode 100644 index 0000000..3c67894 Binary files /dev/null and b/Assets/Skins/resourceBar.guiskin differ diff --git a/Assets/Skins/resourceBar.guiskin.meta b/Assets/Skins/resourceBar.guiskin.meta new file mode 100644 index 0000000..b117689 --- /dev/null +++ b/Assets/Skins/resourceBar.guiskin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6a70263954cff442789a9545789af8a6 +timeCreated: 1508101068 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Skins/resourceBar.png b/Assets/Skins/resourceBar.png new file mode 100644 index 0000000..f39e5c6 Binary files /dev/null and b/Assets/Skins/resourceBar.png differ diff --git a/Assets/Skins/resourceBar.png.meta b/Assets/Skins/resourceBar.png.meta new file mode 100644 index 0000000..ac47c5b --- /dev/null +++ b/Assets/Skins/resourceBar.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 197c79d3cd33c40eb8662e3cd2bdf897 +timeCreated: 1508101021 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units.meta b/Assets/Units.meta new file mode 100644 index 0000000..4f94694 --- /dev/null +++ b/Assets/Units.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 833863349546547919141b6dad3a3b32 +folderAsset: yes +timeCreated: 1509324879 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Tank.meta b/Assets/Units/Tank.meta new file mode 100644 index 0000000..012fe1d --- /dev/null +++ b/Assets/Units/Tank.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f0a152e581f034e71b43fdb5b37e24a9 +folderAsset: yes +timeCreated: 1509324979 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Tank/Tank.cs b/Assets/Units/Tank/Tank.cs new file mode 100644 index 0000000..9cbd7bc --- /dev/null +++ b/Assets/Units/Tank/Tank.cs @@ -0,0 +1,43 @@ +using UnityEngine; +using System.Collections; +using RTS; +public class Tank : Unit { + private Quaternion aimRotation; + + protected override void Start () { + base.Start (); + } + + protected override void Update () { + base.Update(); + if(aiming) { + transform.rotation = Quaternion.RotateTowards(transform.rotation, aimRotation, weaponAimSpeed); + CalculateBounds(); + //sometimes it gets stuck exactly 180 degrees out in the calculation and does nothing, this check fixes that + Quaternion inverseAimRotation = new Quaternion(-aimRotation.x, -aimRotation.y, -aimRotation.z, -aimRotation.w); + if(transform.rotation == aimRotation || transform.rotation == inverseAimRotation) { + aiming = false; + } + } + } + public override bool CanAttack() { + return true; + } + protected override void AimAtTarget () { + base.AimAtTarget(); + aimRotation = Quaternion.LookRotation (target.transform.position - transform.position); + } + protected override void UseWeapon () { + base.UseWeapon(); + Vector3 spawnPoint = transform.position; + spawnPoint.x += (2.1f * transform.forward.x); + spawnPoint.y += 1.4f; + spawnPoint.z += (2.1f * transform.forward.z); + GameObject gameObject = (GameObject)Instantiate(ResourceManager.GetWorldObject("TankProjectile"), spawnPoint, transform.rotation); + Projectile projectile = gameObject.GetComponentInChildren< Projectile >(); + projectile.SetRange(0.9f * weaponRange); + projectile.SetTarget(target); + } + + +} diff --git a/Assets/Units/Tank/Tank.cs.meta b/Assets/Units/Tank/Tank.cs.meta new file mode 100644 index 0000000..52c0a43 --- /dev/null +++ b/Assets/Units/Tank/Tank.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5c9fa3e25673249b9a5db61eacfe207a +timeCreated: 1509324675 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Tank/Tank.prefab b/Assets/Units/Tank/Tank.prefab new file mode 100644 index 0000000..40f86a2 Binary files /dev/null and b/Assets/Units/Tank/Tank.prefab differ diff --git a/Assets/Units/Tank/Tank.prefab.meta b/Assets/Units/Tank/Tank.prefab.meta new file mode 100644 index 0000000..88c53e4 --- /dev/null +++ b/Assets/Units/Tank/Tank.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0bbd22e6295f94ee986fa6c27366c45c +timeCreated: 1509325143 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Tank/TankAmmo.prefab b/Assets/Units/Tank/TankAmmo.prefab new file mode 100644 index 0000000..4a37cc5 Binary files /dev/null and b/Assets/Units/Tank/TankAmmo.prefab differ diff --git a/Assets/Units/Tank/TankAmmo.prefab.meta b/Assets/Units/Tank/TankAmmo.prefab.meta new file mode 100644 index 0000000..84816da --- /dev/null +++ b/Assets/Units/Tank/TankAmmo.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3bbf727fc45f74c4a8c6a19e2e15dcaa +timeCreated: 1511112666 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Tank/TankButton.prefab b/Assets/Units/Tank/TankButton.prefab new file mode 100644 index 0000000..044f06a Binary files /dev/null and b/Assets/Units/Tank/TankButton.prefab differ diff --git a/Assets/Units/Tank/TankButton.prefab.meta b/Assets/Units/Tank/TankButton.prefab.meta new file mode 100644 index 0000000..4171801 --- /dev/null +++ b/Assets/Units/Tank/TankButton.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9f325d75642a491c9121e237c00ddff +timeCreated: 1511482061 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Tank/TankProjectile.cs b/Assets/Units/Tank/TankProjectile.cs new file mode 100644 index 0000000..3e61ab2 --- /dev/null +++ b/Assets/Units/Tank/TankProjectile.cs @@ -0,0 +1,6 @@ +using UnityEngine; +using System.Collections; + +public class TankProjectile : Projectile { + +} diff --git a/Assets/Units/Tank/TankProjectile.cs.meta b/Assets/Units/Tank/TankProjectile.cs.meta new file mode 100644 index 0000000..4b0b72f --- /dev/null +++ b/Assets/Units/Tank/TankProjectile.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 42bd806f039d045568aa54bcbb5d06de +timeCreated: 1509472833 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Tank/buildimage.png b/Assets/Units/Tank/buildimage.png new file mode 100644 index 0000000..7ba2f1f Binary files /dev/null and b/Assets/Units/Tank/buildimage.png differ diff --git a/Assets/Units/Tank/buildimage.png.meta b/Assets/Units/Tank/buildimage.png.meta new file mode 100644 index 0000000..d41b660 --- /dev/null +++ b/Assets/Units/Tank/buildimage.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 817b2f58de41744b08972d9c27c5e778 +timeCreated: 1509325122 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Unit.cs b/Assets/Units/Unit.cs new file mode 100644 index 0000000..057ce83 --- /dev/null +++ b/Assets/Units/Unit.cs @@ -0,0 +1,105 @@ +using UnityEngine; +using System.Collections; +using RTS; +public class Unit : RTSObject { + + protected bool moving, rotating; + + public float moveSpeed, rotateSpeed; + + + public float attackRadius; + public Ammo ammo; + public Vector3 destination; + public GameObject ammoSpawn; + private Quaternion targetRotation; + private float reloadCounter; + + protected override void Awake() { + base.Awake(); + if (ammo) reloadCounter = ammo.reloadTime; + } + + protected override void Start () { + base.Start(); + } + + protected override void Update () { + base.Update(); + if (ammo) { + if (rotating) + TurnToTarget (); + else if (moving) + MakeMove (); + if (target) { + Attack (target); + } + if (reloadCounter > 0) { + reloadCounter -= Time.deltaTime; + } + } + } + + protected override void OnGUI() { + base.OnGUI(); + } + + + public void Attack(RTSObject target) { + bool inRange = Vector3.Distance (gameObject.transform.position, target.transform.position) <= attackRadius; + bool reloadReady = reloadCounter <= 0; + transform.LookAt (target.transform); + if (inRange & reloadReady & canAttack) { + Fire (ammo, target); + reloadCounter = ammo.reloadTime; + } + } + public void Fire(Ammo ammo, RTSObject target) { + Ammo bullet = Instantiate (ammo, ammoSpawn.transform.position, Quaternion.identity) as Ammo; + bullet.target = target; + } + + public override void MouseClick(GameObject hitObject, Vector3 hitPoint, Player controller) { + base.MouseClick(hitObject, hitPoint, controller); + //only handle input if owned by a human player and currently selected + if(player && player.human && currentlySelected) { + if(hitObject.name == "Ground" && hitPoint != ResourceManager.InvalidPosition) { + Debug.Log (hitPoint); + float x = hitPoint.x; + //makes sure that the unit stays on top of the surface it is on + float y = hitPoint.y + player.SelectedObject.transform.position.y; + float z = hitPoint.z; + Vector3 destination = new Vector3(x, y, z); + StartMove(destination); + } + } + } + public void StartMove(Vector3 destination) { + Debug.Log ("startMove"); + this.destination = destination; + targetRotation = Quaternion.LookRotation (destination - transform.position); + rotating = true; + moving = false; + } + private void TurnToTarget() { + Debug.Log ("turnToTarget"); + transform.rotation = Quaternion.RotateTowards(transform.rotation, target.transform.rotation, rotateSpeed); + //sometimes it gets stuck exactly 180 degrees out in the calculation and does nothing, this check fixes that + Quaternion inverseTargetRotation = new Quaternion(-targetRotation.x, -targetRotation.y, -targetRotation.z, -targetRotation.w); + if(transform.rotation == targetRotation || transform.rotation == inverseTargetRotation) { + rotating = false; + moving = true; + } + } + + private void MakeMove() { + Debug.Log ("makeMove"); + transform.position = Vector3.MoveTowards(transform.position, destination, Time.deltaTime * moveSpeed); + if(transform.position == destination) {moving = false; movingIntoPosition = false;} + CalculateBounds(); + } + public void MoveTo(Vector3 dest){ + transform.GetComponent().destination = dest; + } + +} diff --git a/Assets/Units/Unit.cs.meta b/Assets/Units/Unit.cs.meta new file mode 100644 index 0000000..07412a1 --- /dev/null +++ b/Assets/Units/Unit.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f9cd93392a3e94588a56b3df263e143b +timeCreated: 1509061880 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Units.cs b/Assets/Units/Units.cs new file mode 100644 index 0000000..079c237 --- /dev/null +++ b/Assets/Units/Units.cs @@ -0,0 +1,6 @@ +using UnityEngine; +using System.Collections; + +public class Units : MonoBehaviour { + +} diff --git a/Assets/Units/Units.cs.meta b/Assets/Units/Units.cs.meta new file mode 100644 index 0000000..1d39bb6 --- /dev/null +++ b/Assets/Units/Units.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c253aa4a008b740e0be51d29ec99d927 +timeCreated: 1509405993 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Worker.meta b/Assets/Units/Worker.meta new file mode 100644 index 0000000..a90d130 --- /dev/null +++ b/Assets/Units/Worker.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7ba439f3df80a46b98fc84380efc2055 +folderAsset: yes +timeCreated: 1509637848 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Worker/Worker.cs b/Assets/Units/Worker/Worker.cs new file mode 100644 index 0000000..f14f1cd --- /dev/null +++ b/Assets/Units/Worker/Worker.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System.Collections; +using RTS; +public class Worker : Unit { + + public int resourceAmount; + public float harvestTime; + private float timeRemaining; + + protected override void Awake() { + base.Awake (); + timeRemaining = harvestTime; + } + + protected override void Start () { + base.Start (); + } + + protected override void Update () { + + base.Update (); + + if (timeRemaining <= 0) { + addResource (ResourceType.Power, resourceAmount); + timeRemaining = harvestTime; + } else { + timeRemaining -= Time.deltaTime; + } + + } + + protected override void OnGUI() { + base.OnGUI (); + } + + + public bool addResource(ResourceType resourceName, int value) { + return player.addResource (resourceName, value); + } + + +} diff --git a/Assets/Units/Worker/Worker.cs.meta b/Assets/Units/Worker/Worker.cs.meta new file mode 100644 index 0000000..9148f4c --- /dev/null +++ b/Assets/Units/Worker/Worker.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c435c6701a594491a944ca3e543f71de +timeCreated: 1509637963 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Units/Worker/Worker.prefab b/Assets/Units/Worker/Worker.prefab new file mode 100644 index 0000000..7954134 Binary files /dev/null and b/Assets/Units/Worker/Worker.prefab differ diff --git a/Assets/Units/Worker/Worker.prefab.meta b/Assets/Units/Worker/Worker.prefab.meta new file mode 100644 index 0000000..43238b9 --- /dev/null +++ b/Assets/Units/Worker/Worker.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 76ae9c6031b0c407bb167b07b8fdba01 +timeCreated: 1509637851 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts.meta b/Assets/_Scripts.meta new file mode 100644 index 0000000..5829065 --- /dev/null +++ b/Assets/_Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 44438c6c9163a403fbc663e47748e390 +folderAsset: yes +timeCreated: 1507765074 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/Ammo.cs b/Assets/_Scripts/Ammo.cs new file mode 100644 index 0000000..973c0b2 --- /dev/null +++ b/Assets/_Scripts/Ammo.cs @@ -0,0 +1,54 @@ +using UnityEngine; +using System.Collections; + +public class Ammo : MonoBehaviour { + + // Use this for initialization + public RTSObject target; + public int damage; + public float reloadTime; + public float radius; + private float currentTime = 0; + public float timeToLand; + private Vector3 start; + + void Start () { + //transform.GetComponent ().destination = target.transform.position; + start = transform.position; + + } + + // Update is called once per frame + void Update () { + if (Vector3.Distance (target.transform.position, transform.position) <= radius) { + target.TakeDamage (damage); + Destroy (gameObject); + + } else + MoveToTarget (); + } + + private void MoveToTarget () { + currentTime += Time.deltaTime; + float timeRatio = currentTime / timeToLand; + transform.position = Vector3.Lerp (start, target.targetPoint.position, timeRatio); + + } + +// void OnCollisionEnter(Collision col) { +// Debug.Log ("HIT?"); +// foreach (ContactPoint contact in col.contacts) { +// if (contact.otherCollider.transform.parent == target.transform) { +// Debug.Log ("Hit"); +// } +// } +// } +// +// void OnTriggerEnter(Collider other) { +// Debug.Log ("HIT?"); +// if (other.transform.parent == target.transform) { +// Debug.Log ("Hit"); +// } +// } + +} diff --git a/Assets/_Scripts/Ammo.cs.meta b/Assets/_Scripts/Ammo.cs.meta new file mode 100644 index 0000000..8db964f --- /dev/null +++ b/Assets/_Scripts/Ammo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c5b61accc5acd4392937437c53c1a28e +timeCreated: 1510533690 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/Builder.cs b/Assets/_Scripts/Builder.cs new file mode 100644 index 0000000..9faf080 --- /dev/null +++ b/Assets/_Scripts/Builder.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using RTS; + +public class Builder : MonoBehaviour { + + + public Building[] constructableBuildings; + private Dictionary buildings; + private Building currentBuilding; + + void Start () { + buildings = new Dictionary (); + for (int i = 0; i < constructableBuildings.Length; i++) { + Building constructable = constructableBuildings [i]; + buildings.Add (constructable.objectName, constructable); + } + currentBuilding = null; + } + + // Update is called once per frame + void Update () { + } + + public bool CanBuildHere() { + return (currentBuilding != null); + } + + public void CreateBuilding(string buildingName, Player player) { + Building newBuilding = Instantiate (buildings [buildingName], transform.position, Quaternion.identity) as Building; + newBuilding.gameObject.transform.parent = player.GetComponentInChildren< Buildings > ().transform; + currentBuilding = newBuilding; + } +} diff --git a/Assets/_Scripts/Builder.cs.meta b/Assets/_Scripts/Builder.cs.meta new file mode 100644 index 0000000..963b51f --- /dev/null +++ b/Assets/_Scripts/Builder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bc1dd1fbac6464d3db5e90cf57226bc8 +timeCreated: 1510443563 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/ButtonPanel.cs b/Assets/_Scripts/ButtonPanel.cs new file mode 100644 index 0000000..7477b82 --- /dev/null +++ b/Assets/_Scripts/ButtonPanel.cs @@ -0,0 +1,34 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.UI; +public class ButtonPanel : MonoBehaviour { + + // Use this for initialization + private RectTransform panelRect; + public RTSObject[] arr; + void Start () { + panelRect = gameObject.GetComponent (); + List list = new List (); + foreach (RTSObject obj in arr) { + list.Add (obj); + } + RefreshTable (list); + } + + // Update is called once per frame + void Update () { + + } + + public void RefreshTable(List selectedObjects) { + foreach (Transform child in gameObject.transform) { + GameObject.Destroy(child.gameObject); + } + foreach (RTSObject obj in selectedObjects) { + RTSButton btn = Instantiate (obj.selectionIcon, transform.position, Quaternion.identity) as RTSButton; + btn.owner = obj; + btn.transform.SetParent (gameObject.transform, false); + } + } +} diff --git a/Assets/_Scripts/ButtonPanel.cs.meta b/Assets/_Scripts/ButtonPanel.cs.meta new file mode 100644 index 0000000..87e8c2a --- /dev/null +++ b/Assets/_Scripts/ButtonPanel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b6e80bb89b15349c2bf9fefed0473a25 +timeCreated: 1511485853 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/Detection.cs b/Assets/_Scripts/Detection.cs new file mode 100644 index 0000000..22691f4 --- /dev/null +++ b/Assets/_Scripts/Detection.cs @@ -0,0 +1,29 @@ +using UnityEngine; +using System.Collections; + +public class Detection : MonoBehaviour { + + public RTSObject parent; + + void Start() { + parent = gameObject.GetComponentInParent (); + } + + void OnTriggerStay(Collider col) { + if (parent) { + RTSObject obj = col.gameObject.GetComponent ().parent; + if (obj) { + bool enemy = obj.transform.root.name != parent.transform.root.name; + if (!parent.directTarget && !parent.target && enemy) { + parent.target = obj; + } + } + } + + } + void OnTriggerExit(Collider col) { + if (parent.target == col.gameObject.GetComponent ().parent) { + parent.target = null; + } + } +} diff --git a/Assets/_Scripts/Detection.cs.meta b/Assets/_Scripts/Detection.cs.meta new file mode 100644 index 0000000..722d613 --- /dev/null +++ b/Assets/_Scripts/Detection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0424544bc62684ac79635c64b25795dc +timeCreated: 1511285832 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/GameObjectList.cs b/Assets/_Scripts/GameObjectList.cs new file mode 100644 index 0000000..aaea855 --- /dev/null +++ b/Assets/_Scripts/GameObjectList.cs @@ -0,0 +1,70 @@ +using UnityEngine; +using System.Collections; +using RTS; +public class GameObjectList : MonoBehaviour { + + private static bool created = false; + + public GameObject[] buildings; + public GameObject[] units; + public GameObject[] worldObjects; + public GameObject player; + + + void Awake() { + if(!created) { + DontDestroyOnLoad(transform.gameObject); + ResourceManager.SetGameObjectList(this); + created = true; + } else { + Destroy(this.gameObject); + } + } + + void Start () { + + } + + void Update () { + + } + + public GameObject GetBuilding(string name) { + for(int i = 0; i < buildings.Length; i++) { + Building building = buildings[i].GetComponent< Building >(); + if(building && building.name == name) return buildings[i]; + } + return null; + } + + public GameObject GetUnit(string name) { + for(int i = 0; i < units.Length; i++) { + Unit unit = units[i].GetComponent< Unit >(); + if(unit && unit.name == name) return units[i]; + } + return null; + } + + public GameObject GetWorldObject(string name) { + foreach(GameObject worldObject in worldObjects) { + if(worldObject.name == name) return worldObject; + } + return null; + } + + public GameObject GetPlayerObject() { + return player; + } + + public Texture2D GetBuildImage(string name) { + for(int i = 0; i < buildings.Length; i++) { + Building building = buildings[i].GetComponent< Building >(); + if(building && building.name == name) return building.buildImage; + } + for(int i = 0; i < units.Length; i++) { + Unit unit = units[i].GetComponent< Unit >(); + if(unit && unit.name == name) return unit.buildImage; + } + return null; + } +} diff --git a/Assets/_Scripts/GameObjectList.cs.meta b/Assets/_Scripts/GameObjectList.cs.meta new file mode 100644 index 0000000..03efac6 --- /dev/null +++ b/Assets/_Scripts/GameObjectList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9dce428c1fb4542439afd4e0dca30e66 +timeCreated: 1509310734 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/HUD.cs b/Assets/_Scripts/HUD.cs new file mode 100644 index 0000000..d7ad26a --- /dev/null +++ b/Assets/_Scripts/HUD.cs @@ -0,0 +1,8 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using RTS; +public class HUD : MonoBehaviour { + + +} diff --git a/Assets/_Scripts/HUD.cs.meta b/Assets/_Scripts/HUD.cs.meta new file mode 100644 index 0000000..5205f2f --- /dev/null +++ b/Assets/_Scripts/HUD.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ecff44386ba5b4819b33e89c6cd73f1c +timeCreated: 1508103534 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/Projectile.cs b/Assets/_Scripts/Projectile.cs new file mode 100644 index 0000000..4fe8f0a --- /dev/null +++ b/Assets/_Scripts/Projectile.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System.Collections; +using RTS; +public class Projectile : MonoBehaviour { + + public float velocity = 1; + public int damage = 1; + + private float range = 1; + private RTSObject target; + + void Update () { + if(HitSomething()) { + InflictDamage(); + Destroy(gameObject); + } + if(range>0) { + float positionChange = Time.deltaTime * velocity; + range -= positionChange; + transform.position += (positionChange * transform.forward); + } else { + Destroy(gameObject); + } + } + + public void SetRange(float range) { + this.range = range; + } + + public void SetTarget(RTSObject target) { + this.target = target; + } + + private bool HitSomething() { + if(target && target.GetSelectionBounds().Contains(transform.position)) return true; + return false; + } + + private void InflictDamage() { + if(target) target.TakeDamage(damage); + } +} \ No newline at end of file diff --git a/Assets/_Scripts/Projectile.cs.meta b/Assets/_Scripts/Projectile.cs.meta new file mode 100644 index 0000000..88090bd --- /dev/null +++ b/Assets/_Scripts/Projectile.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f593ea8d4867944eb94287ef5f2e1bca +timeCreated: 1509472710 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/RTS.meta b/Assets/_Scripts/RTS.meta new file mode 100644 index 0000000..eaf4a44 --- /dev/null +++ b/Assets/_Scripts/RTS.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 10f3cfa5444964d39a00f50c9fa55561 +folderAsset: yes +timeCreated: 1507765712 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/RTS/Enums.cs b/Assets/_Scripts/RTS/Enums.cs new file mode 100644 index 0000000..887549f --- /dev/null +++ b/Assets/_Scripts/RTS/Enums.cs @@ -0,0 +1,7 @@ +using UnityEngine; +using System.Collections; + +namespace RTS { + public enum CursorState { Select, Move, Attack, PanLeft, PanRight, PanUp, PanDown, Harvest } + public enum ResourceType { Power, Capacitance } +} \ No newline at end of file diff --git a/Assets/_Scripts/RTS/Enums.cs.meta b/Assets/_Scripts/RTS/Enums.cs.meta new file mode 100644 index 0000000..57e9945 --- /dev/null +++ b/Assets/_Scripts/RTS/Enums.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7d809be6be09148408132f2a7e180145 +timeCreated: 1509224142 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/RTS/ResourceManager.cs b/Assets/_Scripts/RTS/ResourceManager.cs new file mode 100644 index 0000000..2623e15 --- /dev/null +++ b/Assets/_Scripts/RTS/ResourceManager.cs @@ -0,0 +1,58 @@ +using UnityEngine; +using System.Collections; + + +namespace RTS { + public static class ResourceManager { + private static float scrollSpeed = 25; + private static float scrollWidth = 100; + private static float minCameraHeight = 10; + private static float maxCameraHeight = 40; + private static float rotateSpeed = 100; + private static float rotateAmount = 10; + private static Vector3 invalidPosition = new Vector3(-99999, -99999, -99999); + private static GUISkin selectBoxSkin; + private static Bounds invalidBounds = new Bounds(new Vector3(-99999, -99999, -99999), new Vector3(0, 0, 0)); + private static GameObjectList gameObjectList; + + + + public static float ScrollSpeed { get { return scrollSpeed; } set { scrollSpeed = value; } } + public static float ScrollWidth { get { return scrollWidth; } set { scrollWidth= value; } } + public static float MinCameraHeight { get { return minCameraHeight; } set { minCameraHeight = value; } } + public static float MaxCameraHeight { get { return maxCameraHeight; } set { maxCameraHeight = value; } } + public static float RotateSpeed { get { return rotateSpeed; } set { rotateSpeed = value; } } + public static float RotateAmount { get { return rotateAmount; } set { rotateAmount = value; } } + public static Vector3 InvalidPosition { get { return invalidPosition; } } + public static GUISkin SelectBoxSkin { get { return selectBoxSkin; } } + public static void StoreSelectBoxItems(GUISkin skin) { + selectBoxSkin = skin; + } + public static Bounds InvalidBounds { get { return invalidBounds; } } + public static int BuildSpeed { get { return 2; } } + + public static void SetGameObjectList(GameObjectList objectList) { + gameObjectList = objectList; + } + + public static GameObject GetBuilding(string name) { + return gameObjectList.GetBuilding(name); + } + + public static GameObject GetUnit(string name) { + return gameObjectList.GetUnit(name); + } + + public static GameObject GetWorldObject(string name) { + return gameObjectList.GetWorldObject(name); + } + + public static GameObject GetPlayerObject() { + return gameObjectList.GetPlayerObject(); + } + + public static Texture2D GetBuildImage(string name) { + return gameObjectList.GetBuildImage(name); + } + } +} \ No newline at end of file diff --git a/Assets/_Scripts/RTS/ResourceManager.cs.meta b/Assets/_Scripts/RTS/ResourceManager.cs.meta new file mode 100644 index 0000000..d22596a --- /dev/null +++ b/Assets/_Scripts/RTS/ResourceManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c189f5d81a94b47e0b3e1619ef89ef50 +timeCreated: 1507765742 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/RTS/SortedSet.cs b/Assets/_Scripts/RTS/SortedSet.cs new file mode 100644 index 0000000..dad3001 --- /dev/null +++ b/Assets/_Scripts/RTS/SortedSet.cs @@ -0,0 +1,80 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +public class SortedSet : ICollection +{ + private readonly List collection = new List(); + // TODO: initializable: + private readonly IComparer comparer = Comparer.Default; + + public void Add(T item) + { + if (Count == 0) + { + collection.Add(item); + return ; + } + +// collection.Insert(minimum, item); + } +// returns index of object that is equal to or "less" than item + public static int binarySearch (List l, int item) { + int index = -1; + int lowIndex = 0; + int highIndex = l.Count - 1; + int midPoint = -1; + while (lowIndex <= highIndex) + { + midPoint = (lowIndex + highIndex) / 2; + int comparison = l[midPoint] - item; + if (comparison == 0) + { + return midPoint; + } + if (comparison < 0) + { + lowIndex = midPoint + 1; + index = lowIndex; + } + else + { + highIndex = midPoint - 1; + index = highIndex; + } + } + return index; + } + public bool Contains(T item) + { + return collection.Contains(item); + } + + public bool Remove(T item) + { + // TODO: potential optimization + return collection.Remove(item); + } + + public IEnumerator GetEnumerator() + { + return collection.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Clear() + { + collection.Clear(); + } + + public void CopyTo(T[] array, int arrayIndex) + { + collection.CopyTo(array, arrayIndex); + } + + public int Count { get { return collection.Count; } } + public bool IsReadOnly { get { return false; } } +} \ No newline at end of file diff --git a/Assets/_Scripts/RTS/SortedSet.cs.meta b/Assets/_Scripts/RTS/SortedSet.cs.meta new file mode 100644 index 0000000..261d7a4 --- /dev/null +++ b/Assets/_Scripts/RTS/SortedSet.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e936f8a4ceb354378bfa5a5b4b8dcd33 +timeCreated: 1511303667 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/RTS/WorkManager.cs b/Assets/_Scripts/RTS/WorkManager.cs new file mode 100644 index 0000000..13ed50f --- /dev/null +++ b/Assets/_Scripts/RTS/WorkManager.cs @@ -0,0 +1,47 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +namespace RTS { + + public static class WorkManager { + public static Rect CalculateSelectionBox(Bounds selectionBounds, Rect playingArea) { + //shorthand for the coordinates of the centre of the selection bounds + float cx = selectionBounds.center.x; + float cy = selectionBounds.center.y; + float cz = selectionBounds.center.z; + //shorthand for the coordinates of the extents of the selection bounds + float ex = selectionBounds.extents.x; + float ey = selectionBounds.extents.y; + float ez = selectionBounds.extents.z; + + //Determine the screen coordinates for the corners of the selection bounds + List< Vector3 > corners = new List< Vector3 >(); + corners.Add(Camera.main.WorldToScreenPoint(new Vector3(cx+ex, cy+ey, cz+ez))); + corners.Add(Camera.main.WorldToScreenPoint(new Vector3(cx+ex, cy+ey, cz-ez))); + corners.Add(Camera.main.WorldToScreenPoint(new Vector3(cx+ex, cy-ey, cz+ez))); + corners.Add(Camera.main.WorldToScreenPoint(new Vector3(cx-ex, cy+ey, cz+ez))); + corners.Add(Camera.main.WorldToScreenPoint(new Vector3(cx+ex, cy-ey, cz-ez))); + corners.Add(Camera.main.WorldToScreenPoint(new Vector3(cx-ex, cy-ey, cz+ez))); + corners.Add(Camera.main.WorldToScreenPoint(new Vector3(cx-ex, cy+ey, cz-ez))); + corners.Add(Camera.main.WorldToScreenPoint(new Vector3(cx-ex, cy-ey, cz-ez))); + + //Determine the bounds on screen for the selection bounds + Bounds screenBounds = new Bounds(corners[0], Vector3.zero); + for(int i = 1; i < corners.Count; i++) { + screenBounds.Encapsulate(corners[i]); + } + + //Screen coordinates start in the bottom left corner, rather than the top left corner + //this correction is needed to make sure the selection box is drawn in the correct place + float selectBoxTop = playingArea.height - (screenBounds.center.y + screenBounds.extents.y); + float selectBoxLeft = screenBounds.center.x - screenBounds.extents.x; + float selectBoxWidth = 2 * screenBounds.extents.x; + float selectBoxHeight = 2 * screenBounds.extents.y; + + return new Rect(selectBoxLeft, selectBoxTop, selectBoxWidth, selectBoxHeight); + } + + } + +} diff --git a/Assets/_Scripts/RTS/WorkManager.cs.meta b/Assets/_Scripts/RTS/WorkManager.cs.meta new file mode 100644 index 0000000..4c84c81 --- /dev/null +++ b/Assets/_Scripts/RTS/WorkManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5b5c011418e174e66892b816303723f9 +timeCreated: 1509208757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scripts/RTSButton.cs b/Assets/_Scripts/RTSButton.cs new file mode 100644 index 0000000..c75d37e --- /dev/null +++ b/Assets/_Scripts/RTSButton.cs @@ -0,0 +1,32 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; +public class RTSButton : MonoBehaviour { + + public RTSObject owner; + public SelectObject selection; + public Button selfButton; + public Text text; + void Start () { + selfButton = gameObject.GetComponent