Browse Source

Выделение как в rts

Виктор Шейко 5 years ago
parent
commit
7dfe6f0e78

+ 2 - 0
Assets/Materials/GroundBlue.mat

@@ -56,6 +56,7 @@ Material:
         m_Scale: {x: 1, y: 1}
         m_Offset: {x: 0, y: 0}
     m_Floats:
+    - PixelSnap: 0
     - _BumpScale: 1
     - _Cutoff: 0.5
     - _DetailNormalMapScale: 1
@@ -67,6 +68,7 @@ Material:
     - _Metallic: 0
     - _Mode: 0
     - _OcclusionStrength: 1
+    - _OutLineSpread: 0.007
     - _Parallax: 0.02
     - _SmoothnessTextureChannel: 0
     - _SpecularHighlights: 1

+ 16 - 2
Assets/Materials/UnitBody.mat

@@ -9,8 +9,8 @@ Material:
   m_PrefabAsset: {fileID: 0}
   m_Name: UnitBody
   m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
-  m_ShaderKeywords: _ALPHABLEND_ON _EMISSION
-  m_LightmapFlags: 1
+  m_ShaderKeywords: _ALPHABLEND_ON
+  m_LightmapFlags: 6
   m_EnableInstancingVariants: 0
   m_DoubleSidedGI: 0
   m_CustomRenderQueue: 3000
@@ -56,7 +56,16 @@ Material:
         m_Texture: {fileID: 0}
         m_Scale: {x: 1, y: 1}
         m_Offset: {x: 0, y: 0}
+    - _SceneTex:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _SpecGlossMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
     m_Floats:
+    - PixelSnap: 0
     - _BumpScale: 1
     - _Cutoff: 0.5
     - _DetailNormalMapScale: 1
@@ -65,9 +74,12 @@ Material:
     - _GlossMapScale: 1
     - _Glossiness: 0
     - _GlossyReflections: 1
+    - _Glow: 1
     - _Metallic: 0
     - _Mode: 2
     - _OcclusionStrength: 1
+    - _OutLineSpread: 0.007
+    - _Outline: 0.005
     - _Parallax: 0.02
     - _SmoothnessTextureChannel: 0
     - _SpecularHighlights: 1
@@ -78,3 +90,5 @@ Material:
     - _Color: {r: 0.64705884, g: 0.06660899, b: 0.06660899, a: 1}
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
     - _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
+    - _OutlineColor: {r: 0.48013294, g: 0.9529412, b: 0.2941177, a: 1}
+    - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}

+ 14 - 0
Assets/Resources/GameObjects/Beacon.prefab

@@ -91,6 +91,7 @@ GameObject:
   - component: {fileID: 4259244396455922672}
   - component: {fileID: 4182038595796904783}
   - component: {fileID: -3562534023566770947}
+  - component: {fileID: 4728083338205450714}
   m_Layer: 0
   m_Name: Beacon
   m_TagString: Untagged
@@ -204,6 +205,19 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   TrackMarker: 0
+--- !u!114 &4728083338205450714
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2242877738869790936}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: c55d67cfd5b7754458c3649576d4e63b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  selectionCircle: {fileID: 0}
 --- !u!1 &7008440185145172815
 GameObject:
   m_ObjectHideFlags: 0

+ 248 - 3
Assets/Resources/GameObjects/Panel_Beacon.prefab

@@ -37,7 +37,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 120, y: 30}
+  m_SizeDelta: {x: 100, y: 30}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2798523857404094353
 CanvasRenderer:
@@ -150,6 +150,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
   - {fileID: 603391342014318867}
+  - {fileID: 7356257535369158522}
   - {fileID: 24059094328628982}
   m_Father: {fileID: 0}
   m_RootOrder: 0
@@ -266,7 +267,7 @@ RectTransform:
   m_Children:
   - {fileID: 6541051160005592812}
   m_Father: {fileID: 3382307873042124529}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -352,6 +353,124 @@ MonoBehaviour:
   m_OnClick:
     m_PersistentCalls:
       m_Calls: []
+--- !u!1 &5295755639740211308
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 7356257535369158522}
+  - component: {fileID: 7840991157989534172}
+  - component: {fileID: 7016113920084209393}
+  - component: {fileID: 2067121756735095049}
+  m_Layer: 5
+  m_Name: Button_find
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &7356257535369158522
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5295755639740211308}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children:
+  - {fileID: 113979890644402306}
+  m_Father: {fileID: 3382307873042124529}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 117, y: -15}
+  m_SizeDelta: {x: 30, y: 30}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &7840991157989534172
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5295755639740211308}
+  m_CullTransparentMesh: 0
+--- !u!114 &7016113920084209393
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5295755639740211308}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+  m_Type: 1
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &2067121756735095049
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5295755639740211308}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 7016113920084209393}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!1 &9030043268557580160
 GameObject:
   m_ObjectHideFlags: 0
@@ -504,7 +623,7 @@ PrefabInstance:
     - target: {fileID: 7964749099170637757, guid: 581bfc42da38d3f4b8f9af4ebe348d95,
         type: 3}
       propertyPath: m_SizeDelta.x
-      value: 16
+      value: 19
       objectReference: {fileID: 0}
     - target: {fileID: 7964749099170637757, guid: 581bfc42da38d3f4b8f9af4ebe348d95,
         type: 3}
@@ -520,3 +639,129 @@ RectTransform:
     type: 3}
   m_PrefabInstance: {fileID: 3768952431600722257}
   m_PrefabAsset: {fileID: 0}
+--- !u!1001 &8913565146831629282
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    m_TransformParent: {fileID: 7356257535369158522}
+    m_Modifications:
+    - target: {fileID: 2515845631984253673, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_Name
+      value: search-24px
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalRotation.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalRotation.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalRotation.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_RootOrder
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_AnchoredPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_SizeDelta.x
+      value: 20
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_SizeDelta.y
+      value: 20
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_AnchorMin.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_AnchorMin.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_AnchorMax.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_AnchorMax.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_Pivot.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+        type: 3}
+      propertyPath: m_Pivot.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+  m_SourcePrefab: {fileID: 7243324766535440047, guid: 7f85ccbbd93975440933e298fb993e05,
+    type: 3}
+--- !u!224 &113979890644402306 stripped
+RectTransform:
+  m_CorrespondingSourceObject: {fileID: 8802189114881764192, guid: 7f85ccbbd93975440933e298fb993e05,
+    type: 3}
+  m_PrefabInstance: {fileID: 8913565146831629282}
+  m_PrefabAsset: {fileID: 0}

+ 1 - 0
Assets/Resources/Image/Icons/search-24px.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

BIN
Assets/Resources/Image/SelectionCircleAlpha.png


+ 0 - 88
Assets/Resources/Image/SelectionCircleAlpha.png.meta

@@ -1,88 +0,0 @@
-fileFormatVersion: 2
-guid: eefd8f241f84e8e428657e1a15454b70
-TextureImporter:
-  fileIDToRecycleName: {}
-  externalObjects: {}
-  serializedVersion: 9
-  mipmaps:
-    mipMapMode: 0
-    enableMipMap: 1
-    sRGBTexture: 1
-    linearTexture: 0
-    fadeOut: 0
-    borderMipMap: 0
-    mipMapsPreserveCoverage: 0
-    alphaTestReferenceValue: 0.5
-    mipMapFadeDistanceStart: 1
-    mipMapFadeDistanceEnd: 3
-  bumpmap:
-    convertToNormalMap: 0
-    externalNormalMap: 0
-    heightScale: 0.25
-    normalMapFilter: 0
-  isReadable: 0
-  streamingMipmaps: 0
-  streamingMipmapsPriority: 0
-  grayScaleToAlpha: 0
-  generateCubemap: 6
-  cubemapConvolution: 0
-  seamlessCubemap: 0
-  textureFormat: 1
-  maxTextureSize: 2048
-  textureSettings:
-    serializedVersion: 2
-    filterMode: -1
-    aniso: -1
-    mipBias: -100
-    wrapU: -1
-    wrapV: -1
-    wrapW: -1
-  nPOTScale: 1
-  lightmap: 0
-  compressionQuality: 50
-  spriteMode: 0
-  spriteExtrude: 1
-  spriteMeshType: 1
-  alignment: 0
-  spritePivot: {x: 0.5, y: 0.5}
-  spritePixelsToUnits: 100
-  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
-  spriteGenerateFallbackPhysicsShape: 1
-  alphaUsage: 1
-  alphaIsTransparency: 0
-  spriteTessellationDetail: -1
-  textureType: 0
-  textureShape: 1
-  singleChannelComponent: 0
-  maxTextureSizeSet: 0
-  compressionQualitySet: 0
-  textureFormatSet: 0
-  platformSettings:
-  - serializedVersion: 2
-    buildTarget: DefaultTexturePlatform
-    maxTextureSize: 2048
-    resizeAlgorithm: 0
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-    androidETC2FallbackOverride: 0
-  spriteSheet:
-    serializedVersion: 2
-    sprites: []
-    outline: []
-    physicsShape: []
-    bones: []
-    spriteID: 
-    vertices: []
-    indices: 
-    edges: []
-    weights: []
-  spritePackingTag: 
-  pSDRemoveMatte: 0
-  pSDShowRemoveMatteOption: 0
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 56 - 0
Assets/Resources/Projector/ProjectorAdditiveTint.shader

@@ -0,0 +1,56 @@
+// Upgrade NOTE: replaced '_Projector' with 'unity_Projector'
+// Upgrade NOTE: replaced '_ProjectorClip' with 'unity_ProjectorClip'
+// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
+
+Shader "Projector/AdditiveTint" {
+	Properties {
+		_Color ("Tint Color", Color) = (1,1,1,1)
+		_Attenuation ("Falloff", Range(0.0, 1.0)) = 1.0
+		_ShadowTex ("Cookie", 2D) = "gray" {}
+	}
+	Subshader {
+		Tags {"Queue"="Transparent"}
+		Pass {
+			ZWrite Off
+			ColorMask RGB
+			Blend SrcAlpha One // Additive blending
+			Offset -1, -1
+
+			CGPROGRAM
+			#pragma vertex vert
+			#pragma fragment frag
+			#include "UnityCG.cginc"
+			
+			struct v2f {
+				float4 uvShadow : TEXCOORD0;
+				float4 pos : SV_POSITION;
+			};
+			
+			float4x4 unity_Projector;
+			float4x4 unity_ProjectorClip;
+			
+			v2f vert (float4 vertex : POSITION)
+			{
+				v2f o;
+				o.pos = UnityObjectToClipPos (vertex);
+				o.uvShadow = mul (unity_Projector, vertex);
+				return o;
+			}
+			
+			sampler2D _ShadowTex;
+			fixed4 _Color;
+			float _Attenuation;
+			
+			fixed4 frag (v2f i) : SV_Target
+			{
+				// Apply alpha mask
+				fixed4 texCookie = tex2Dproj (_ShadowTex, UNITY_PROJ_COORD(i.uvShadow));
+				fixed4 outColor = _Color * texCookie.a;
+				// Attenuation
+				float depth = i.uvShadow.z; // [-1 (near), 1 (far)]
+				return outColor * clamp(1.0 - abs(depth) + _Attenuation, 0.0, 1.0);
+			}
+			ENDCG
+		}
+	}
+}

+ 52 - 0
Assets/Resources/Shaders/Glow.shader

@@ -0,0 +1,52 @@
+// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
+
+Shader "Glow" {
+    Properties{
+        _MainTex("Texture", 2D) = "white" {}
+        _Color("Color", Color) = (1,1,1,1)
+        _Glow("Intensity", Range(0, 3)) = 1
+    }
+        SubShader{
+            Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
+            LOD 100
+            Cull Off
+            ZWrite On
+            Blend SrcAlpha OneMinusSrcAlpha
+
+            Pass {
+                CGPROGRAM
+                    #pragma vertex vert
+                    #pragma fragment frag
+
+                    sampler2D _MainTex;
+                    half4 _MainTex_ST;
+                    fixed4 _Color;
+                    half _Glow;
+
+                    struct vertIn {
+                        float4 pos : POSITION;
+                        half2 tex : TEXCOORD0;
+                    };
+
+                    struct v2f {
+                        float4 pos : SV_POSITION;
+                        half2 tex : TEXCOORD0;
+                    };
+
+                    v2f vert(vertIn v) {
+                        v2f o;
+                        o.pos = UnityObjectToClipPos(v.pos);
+                        o.tex = v.tex * _MainTex_ST.xy + _MainTex_ST.zw;
+                        return o;
+                    }
+
+                    fixed4 frag(v2f f) : SV_Target {
+                        fixed4 col = tex2D(_MainTex, f.tex);
+                        col *= _Color;
+                        col *= _Glow;
+                        return col;
+                    }
+                ENDCG
+            }
+        }
+}

+ 136 - 0
Assets/Resources/Shaders/Outlined.shader

@@ -0,0 +1,136 @@
+// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
+
+Shader "Outlined/Silhouetted Diffuse" {
+    Properties{
+        _Color("Main Color", Color) = (.5,.5,.5,1)
+        _OutlineColor("Outline Color", Color) = (0,0,0,1)
+        _Outline("Outline width", Range(0.0, 0.03)) = .005
+        _MainTex("Base (RGB)", 2D) = "white" { }
+    }
+
+        CGINCLUDE
+#include "UnityCG.cginc"
+
+        struct appdata {
+        float4 vertex : POSITION;
+        float3 normal : NORMAL;
+    };
+
+    struct v2f {
+        float4 pos : POSITION;
+        float4 color : COLOR;
+    };
+
+    uniform float _Outline;
+    uniform float4 _OutlineColor;
+
+    v2f vert(appdata v) {
+        // just make a copy of incoming vertex data but scaled according to normal direction
+        v2f o;
+        o.pos = UnityObjectToClipPos(v.vertex);
+
+        float3 norm = mul((float3x3)UNITY_MATRIX_IT_MV, v.normal);
+        float2 offset = TransformViewToProjection(norm.xy);
+
+        o.pos.xy += offset * o.pos.z * _Outline;
+        o.color = _OutlineColor;
+        return o;
+    }
+    ENDCG
+
+        SubShader{
+            Tags { "Queue" = "Transparent" }
+
+            // note that a vertex shader is specified here but its using the one above
+            Pass {
+                Name "OUTLINE"
+                Tags { "LightMode" = "Always" }
+                Cull Off
+                ZWrite Off
+                ZTest Always
+                ColorMask RGB // alpha not used
+
+                // you can choose what kind of blending mode you want for the outline
+                Blend SrcAlpha OneMinusSrcAlpha // Normal
+                //Blend One One // Additive
+                //Blend One OneMinusDstColor // Soft Additive
+                //Blend DstColor Zero // Multiplicative
+                //Blend DstColor SrcColor // 2x Multiplicative
+
+    CGPROGRAM
+    #pragma vertex vert
+    #pragma fragment frag
+
+    half4 frag(v2f i) :COLOR {
+        return i.color;
+    }
+    ENDCG
+            }
+
+            Pass {
+                Name "BASE"
+                ZWrite On
+                ZTest LEqual
+                Blend SrcAlpha OneMinusSrcAlpha
+                Material {
+                    Diffuse[_Color]
+                    Ambient[_Color]
+                }
+                Lighting On
+                SetTexture[_MainTex] {
+                    ConstantColor[_Color]
+                    Combine texture * constant
+                }
+                SetTexture[_MainTex] {
+                    Combine previous * primary DOUBLE
+                }
+            }
+    }
+
+        SubShader{
+            Tags { "Queue" = "Transparent" }
+
+            Pass {
+                Name "OUTLINE"
+                Tags { "LightMode" = "Always" }
+                Cull Front
+                ZWrite Off
+                ZTest Always
+                ColorMask RGB
+
+        // you can choose what kind of blending mode you want for the outline
+        Blend SrcAlpha OneMinusSrcAlpha // Normal
+        //Blend One One // Additive
+        //Blend One OneMinusDstColor // Soft Additive
+        //Blend DstColor Zero // Multiplicative
+        //Blend DstColor SrcColor // 2x Multiplicative
+
+        CGPROGRAM
+        #pragma vertex vert
+        #pragma exclude_renderers gles xbox360 ps3
+        ENDCG
+        SetTexture[_MainTex] { combine primary }
+    }
+
+    Pass {
+        Name "BASE"
+        ZWrite On
+        ZTest LEqual
+        Blend SrcAlpha OneMinusSrcAlpha
+        Material {
+            Diffuse[_Color]
+            Ambient[_Color]
+        }
+        Lighting On
+        SetTexture[_MainTex] {
+            ConstantColor[_Color]
+            Combine texture * constant
+        }
+        SetTexture[_MainTex] {
+            Combine previous * primary DOUBLE
+        }
+    }
+    }
+
+        Fallback "Diffuse"
+}

+ 86 - 0
Assets/Resources/Shaders/Post Outline.shader

@@ -0,0 +1,86 @@
+// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
+
+Shader "Outlined/Post Outline"
+{
+    Properties
+    {
+        _MainTex("Main Texture",2D) = "black"{}
+        _SceneTex("Scene Texture",2D) = "black"{}
+    }
+        SubShader
+    {
+        Pass
+        {
+            CGPROGRAM
+
+            sampler2D _MainTex;
+
+    //_TexelSize is a float2 that says how much screen space a texel occupies.
+    float2 _MainTex_TexelSize;
+
+    #pragma vertex vert
+    #pragma fragment frag
+    #include "UnityCG.cginc"
+
+    struct v2f
+    {
+        float4 pos : SV_POSITION;
+        float2 uvs : TEXCOORD0;
+    };
+
+    v2f vert(appdata_base v)
+    {
+        v2f o;
+
+        //Despite the fact that we are only drawing a quad to the screen, Unity requires us to multiply vertices by our MVP matrix, presumably to keep things working when inexperienced people try copying code from other shaders.
+        o.pos = UnityObjectToClipPos(v.vertex);
+
+        //Also, we need to fix the UVs to match our screen space coordinates. There is a Unity define for this that should normally be used.
+        o.uvs = o.pos.xy / 2 + 0.5;
+
+        return o;
+    }
+
+    half frag(v2f i) : COLOR
+    {
+        //arbitrary number of iterations for now
+        int NumberOfIterations = 20;
+
+    //split texel size into smaller words
+    float TX_x = _MainTex_TexelSize.x;
+
+    //and a final intensity that increments based on surrounding intensities.
+    float ColorIntensityInRadius;
+
+    //for every iteration we need to do horizontally
+    for (int k = 0; k0)
+    {
+        return tex2D(_SceneTex,float2(i.uvs.x,1 - i.uvs.y));
+    }
+
+    //for every iteration we need to do vertically
+    for (int j = 0; j < NumberOfIterations; j += 1)
+    {
+        //increase our output color by the pixels in the area
+        ColorIntensityInRadius += tex2D(
+                                        _GrabTexture,
+                                        float2(i.uvs.x,1 - i.uvs.y) + float2
+                                                                        (
+                                                                            0,
+                                                                            (j - NumberOfIterations / 2) * TX_y
+                                                                        )
+                                        ).r / NumberOfIterations;
+    }
+
+    //this is alpha blending, but we can't use HW blending unless we make a third pass, so this is probably cheaper.
+    half4 outcolor = ColorIntensityInRadius * half4(0,1,1,1) * 2 + (1 - ColorIntensityInRadius) * tex2D(_SceneTex,float2(i.uvs.x,1 - i.uvs.y));
+    return outcolor;
+}
+
+ENDCG
+
+}
+//end pass
+    }
+        //end subshader
+}

+ 56 - 0
Assets/Resources/Shaders/ProjectorAdditiveTint.shader

@@ -0,0 +1,56 @@
+// Upgrade NOTE: replaced '_Projector' with 'unity_Projector'
+// Upgrade NOTE: replaced '_ProjectorClip' with 'unity_ProjectorClip'
+// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
+
+Shader "Projector/AdditiveTint" {
+	Properties {
+		_Color ("Tint Color", Color) = (1,1,1,1)
+		_Attenuation ("Falloff", Range(0.0, 1.0)) = 1.0
+		_ShadowTex ("Cookie", 2D) = "gray" {}
+	}
+	Subshader {
+		Tags {"Queue"="Transparent"}
+		Pass {
+			ZWrite Off
+			ColorMask RGB
+			Blend SrcAlpha One // Additive blending
+			Offset -1, -1
+
+			CGPROGRAM
+			#pragma vertex vert
+			#pragma fragment frag
+			#include "UnityCG.cginc"
+			
+			struct v2f {
+				float4 uvShadow : TEXCOORD0;
+				float4 pos : SV_POSITION;
+			};
+			
+			float4x4 unity_Projector;
+			float4x4 unity_ProjectorClip;
+			
+			v2f vert (float4 vertex : POSITION)
+			{
+				v2f o;
+				o.pos = UnityObjectToClipPos (vertex);
+				o.uvShadow = mul (unity_Projector, vertex);
+				return o;
+			}
+			
+			sampler2D _ShadowTex;
+			fixed4 _Color;
+			float _Attenuation;
+			
+			fixed4 frag (v2f i) : SV_Target
+			{
+				// Apply tint & alpha mask
+				fixed4 texCookie = tex2Dproj (_ShadowTex, UNITY_PROJ_COORD(i.uvShadow));
+				fixed4 outColor = _Color * texCookie.a;
+				// Distance attenuation
+				float depth = i.uvShadow.z; // [-1(near), 1(far)]
+				return outColor * clamp(1.0 - abs(depth) + _Attenuation, 0.0, 1.0);
+			}
+			ENDCG
+		}
+	}
+}

+ 131 - 0
Assets/Resources/Shaders/Silhouetted Bumped Diffuse.shader

@@ -0,0 +1,131 @@
+// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
+
+Shader "Outlined/Silhouetted Bumped Diffuse" {
+	Properties{
+		_Color("Main Color", Color) = (.5,.5,.5,1)
+		_OutlineColor("Outline Color", Color) = (0,0,0,1)
+		_Outline("Outline width", Range(0.0, 0.03)) = .005
+		_MainTex("Base (RGB)", 2D) = "white" { }
+		_BumpMap("Bumpmap", 2D) = "bump" {}
+	}
+
+		CGINCLUDE
+#include "UnityCG.cginc"
+
+		struct appdata {
+		float4 vertex : POSITION;
+		float3 normal : NORMAL;
+	};
+
+	struct v2f {
+		float4 pos : POSITION;
+		float4 color : COLOR;
+	};
+
+	uniform float _Outline;
+	uniform float4 _OutlineColor;
+
+	v2f vert(appdata v) {
+		// just make a copy of incoming vertex data but scaled according to normal direction
+		v2f o;
+		o.pos = UnityObjectToClipPos(v.vertex);
+
+		float3 norm = mul((float3x3)UNITY_MATRIX_IT_MV, v.normal);
+		float2 offset = TransformViewToProjection(norm.xy);
+
+		o.pos.xy += offset * o.pos.z * _Outline;
+		o.color = _OutlineColor;
+		return o;
+	}
+	ENDCG
+
+		SubShader{
+			Tags { "Queue" = "Transparent" }
+
+			// note that a vertex shader is specified here but its using the one above
+			Pass {
+				Name "OUTLINE"
+				Tags { "LightMode" = "Always" }
+				Cull Off
+				ZWrite Off
+				ZTest Always
+
+		// you can choose what kind of blending mode you want for the outline
+		Blend SrcAlpha OneMinusSrcAlpha // Normal
+		//Blend One One // Additive
+		//Blend One OneMinusDstColor // Soft Additive
+		//Blend DstColor Zero // Multiplicative
+		//Blend DstColor SrcColor // 2x Multiplicative
+
+CGPROGRAM
+#pragma vertex vert
+#pragma fragment frag
+
+half4 frag(v2f i) : COLOR {
+	return i.color;
+}
+ENDCG
+		}
+
+
+CGPROGRAM
+#pragma surface surf Lambert
+struct Input {
+	float2 uv_MainTex;
+	float2 uv_BumpMap;
+};
+sampler2D _MainTex;
+sampler2D _BumpMap;
+uniform float3 _Color;
+void surf(Input IN, inout SurfaceOutput o) {
+	o.Albedo = tex2D(_MainTex, IN.uv_MainTex).rgb * _Color;
+	o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
+}
+ENDCG
+
+	}
+
+		SubShader{
+			Tags { "Queue" = "Transparent" }
+
+			Pass {
+				Name "OUTLINE"
+				Tags { "LightMode" = "Always" }
+				Cull Front
+				ZWrite Off
+				ZTest Always
+				Offset 15,15
+
+	// you can choose what kind of blending mode you want for the outline
+	Blend SrcAlpha OneMinusSrcAlpha // Normal
+	//Blend One One // Additive
+	//Blend One OneMinusDstColor // Soft Additive
+	//Blend DstColor Zero // Multiplicative
+	//Blend DstColor SrcColor // 2x Multiplicative
+
+	CGPROGRAM
+	#pragma vertex vert
+	#pragma exclude_renderers gles xbox360 ps3
+	ENDCG
+	SetTexture[_MainTex] { combine primary }
+}
+
+CGPROGRAM
+#pragma surface surf Lambert
+struct Input {
+	float2 uv_MainTex;
+	float2 uv_BumpMap;
+};
+sampler2D _MainTex;
+sampler2D _BumpMap;
+uniform float3 _Color;
+void surf(Input IN, inout SurfaceOutput o) {
+	o.Albedo = tex2D(_MainTex, IN.uv_MainTex).rgb * _Color;
+	o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
+}
+ENDCG
+
+}
+
+Fallback "Outlined/Silhouetted Diffuse"
+}

+ 17 - 1
Assets/Scenes/Player.unity

@@ -6383,6 +6383,7 @@ GameObject:
   - component: {fileID: 534669903}
   - component: {fileID: 534669906}
   - component: {fileID: 534669907}
+  - component: {fileID: 534669908}
   m_Layer: 0
   m_Name: Main Camera
   m_TagString: MainCamera
@@ -6491,6 +6492,20 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   account_id: 0
   _dataPath: 
+--- !u!114 &534669908
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 534669902}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: dce27bed8edc28d4d9237538d7c5df85, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  selectionCirclePrefab: {fileID: 166266, guid: dc884a6ec589ce249acc9b5326859165,
+    type: 3}
 --- !u!1 &545978266 stripped
 GameObject:
   m_CorrespondingSourceObject: {fileID: 6099118876963798654, guid: 04e9dfc406038d741b31aeebae5c71cb,
@@ -17697,7 +17712,7 @@ MonoBehaviour:
   m_Elasticity: 0.1
   m_Inertia: 1
   m_DecelerationRate: 0.135
-  m_ScrollSensitivity: 1
+  m_ScrollSensitivity: 32
   m_Viewport: {fileID: 1607657809}
   m_HorizontalScrollbar: {fileID: 1526369940}
   m_VerticalScrollbar: {fileID: 1043834002}
@@ -24178,6 +24193,7 @@ MonoBehaviour:
   Markers: {fileID: 1403398548}
   Beacons: {fileID: 143457022}
   Walls: {fileID: 1740594263}
+  WallCursor: {fileID: 8002323671399922969}
 --- !u!1 &1953380811
 GameObject:
   m_ObjectHideFlags: 0

+ 8 - 2
Assets/Scripts/Components/UnitSelectionComponent.cs

@@ -53,15 +53,19 @@ public class UnitSelectionComponent : MonoBehaviour
         // Highlight all objects within the selection box
         if( isSelecting )
         {
-            foreach( var selectableObject in FindObjectsOfType<SelectableUnitComponent>() )
+            var shader1 = Shader.Find("Outlined/Silhouetted Bumped Diffuse");
+            var shader2 = Shader.Find("Standard");
+            foreach ( var selectableObject in FindObjectsOfType<SelectableUnitComponent>() )
             {
                 if( IsWithinSelectionBounds( selectableObject.gameObject ) )
                 {
                     if( selectableObject.selectionCircle == null )
                     {
-                        selectableObject.selectionCircle = Instantiate( selectionCirclePrefab );
+                        selectableObject.selectionCircle = Instantiate( selectionCirclePrefab );  
                         selectableObject.selectionCircle.transform.SetParent( selectableObject.transform, false );
                         selectableObject.selectionCircle.transform.eulerAngles = new Vector3( 90, 0, 0 );
+
+                        selectableObject.GetComponent<Renderer>().material.shader = shader1;
                     }
                 }
                 else
@@ -70,6 +74,8 @@ public class UnitSelectionComponent : MonoBehaviour
                     {
                         Destroy( selectableObject.selectionCircle.gameObject );
                         selectableObject.selectionCircle = null;
+
+                        selectableObject.GetComponent<Renderer>().material.shader = shader2;
                     }
                 }
             }