diff --git a/Assets/Prefabs/PersonNode.prefab b/Assets/Prefabs/PersonNode.prefab
index 51bf4c8..ae41f2c 100644
--- a/Assets/Prefabs/PersonNode.prefab
+++ b/Assets/Prefabs/PersonNode.prefab
@@ -17,6 +17,24 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
+--- !u!1 &147480
+GameObject:
+ m_ObjectHideFlags: 1
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ serializedVersion: 4
+ m_Component:
+ - 4: {fileID: 424146}
+ - 33: {fileID: 3395424}
+ - 23: {fileID: 2372840}
+ - 114: {fileID: 11438000}
+ m_Layer: 0
+ m_Name: xMarkLeft
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
--- !u!1 &176828
GameObject:
m_ObjectHideFlags: 1
@@ -27,8 +45,9 @@ GameObject:
- 4: {fileID: 498100}
- 33: {fileID: 3387390}
- 23: {fileID: 2308108}
+ - 114: {fileID: 11422410}
m_Layer: 0
- m_Name: xQuad
+ m_Name: xMarkRight
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -62,12 +81,24 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 193868}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: -544.163269, y: -235.973114, z: 0}
+ m_LocalPosition: {x: 1.96902442, y: 3.20279193, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 496448}
m_Father: {fileID: 0}
m_RootOrder: 0
+--- !u!4 &424146
+Transform:
+ m_ObjectHideFlags: 1
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ m_GameObject: {fileID: 147480}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: -.00999999978}
+ m_LocalScale: {x: 1.25, y: 1.25, z: 1}
+ m_Children: []
+ m_Father: {fileID: 496448}
+ m_RootOrder: 0
--- !u!4 &496448
Transform:
m_ObjectHideFlags: 1
@@ -78,6 +109,7 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: -.00100000005}
m_LocalScale: {x: .800000012, y: .800000012, z: 1}
m_Children:
+ - {fileID: 424146}
- {fileID: 498100}
m_Father: {fileID: 410576}
m_RootOrder: 0
@@ -89,21 +121,21 @@ Transform:
m_GameObject: {fileID: 176828}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -.00999999978}
- m_LocalScale: {x: 1.5, y: 1.5, z: 1}
+ m_LocalScale: {x: 1.25, y: 1.25, z: 1}
m_Children: []
m_Father: {fileID: 496448}
- m_RootOrder: 0
+ m_RootOrder: 1
--- !u!23 &2308108
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 176828}
- m_Enabled: 0
+ m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_Materials:
- - {fileID: 2100000, guid: 30594d2784eed81489fa210d180bdfce, type: 2}
+ - {fileID: 2100000, guid: 65515d5275108d64f993d24ce2e0e11d, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 1
@@ -165,6 +197,30 @@ MeshRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
+--- !u!23 &2372840
+MeshRenderer:
+ m_ObjectHideFlags: 1
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ m_GameObject: {fileID: 147480}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_Materials:
+ - {fileID: 2100000, guid: 30594d2784eed81489fa210d180bdfce, type: 2}
+ m_SubsetIndices:
+ m_StaticBatchRoot: {fileID: 0}
+ m_UseLightProbes: 1
+ m_ReflectionProbeUsage: 1
+ m_ProbeAnchor: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_PreserveUVs: 1
+ m_ImportantGI: 0
+ m_AutoUVMaxDistance: .5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingOrder: 0
--- !u!33 &3312470
MeshFilter:
m_ObjectHideFlags: 1
@@ -186,6 +242,13 @@ MeshFilter:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 176828}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!33 &3395424
+MeshFilter:
+ m_ObjectHideFlags: 1
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ m_GameObject: {fileID: 147480}
+ m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!54 &5464416
Rigidbody:
m_ObjectHideFlags: 1
@@ -241,7 +304,31 @@ MonoBehaviour:
MiddleColor: {r: 1, g: .921568632, b: .0156862754, a: 1}
EndColor: {r: 1, g: 0, b: 0, a: 1}
internQuad: {fileID: 2363438}
- xQuad: {fileID: 2308108}
+ KillHoldDuration: 2
+ xMarkLeft: {fileID: 11438000}
+ xMarkRight: {fileID: 11422410}
+--- !u!114 &11422410
+MonoBehaviour:
+ m_ObjectHideFlags: 1
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ m_GameObject: {fileID: 176828}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 51e725985a0e317458c006132d935c25, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+--- !u!114 &11438000
+MonoBehaviour:
+ m_ObjectHideFlags: 1
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ m_GameObject: {fileID: 147480}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 51e725985a0e317458c006132d935c25, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
diff --git a/Assets/Resources/Materials/externQuad.mat b/Assets/Resources/Materials/externQuad.mat
index db33c3f..2d830c3 100644
--- a/Assets/Resources/Materials/externQuad.mat
+++ b/Assets/Resources/Materials/externQuad.mat
@@ -2,7 +2,7 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
- serializedVersion: 6
+ serializedVersion: 5
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
@@ -11,7 +11,6 @@ Material:
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
- stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
@@ -79,6 +78,10 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
+ data:
+ first:
+ name: _Cutoff
+ second: .5
data:
first:
name: _SrcBlend
@@ -87,10 +90,6 @@ Material:
first:
name: _DstBlend
second: 0
- data:
- first:
- name: _Cutoff
- second: .5
data:
first:
name: _Parallax
@@ -119,6 +118,10 @@ Material:
first:
name: _UVSec
second: 0
+ data:
+ first:
+ name: _EmissionScaleUI
+ second: 0
data:
first:
name: _Mode
@@ -127,6 +130,10 @@ Material:
first:
name: _Metallic
second: 0
+ data:
+ first:
+ name: _Ratio
+ second: .5
m_Colors:
data:
first:
@@ -136,3 +143,15 @@ Material:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
+ data:
+ first:
+ name: _EmissionColorUI
+ second: {r: 1, g: 1, b: 1, a: 1}
+ data:
+ first:
+ name: _CompletedColor
+ second: {r: 0, g: 0, b: 0, a: 0}
+ data:
+ first:
+ name: _RemainingColor
+ second: {r: 1, g: 1, b: 1, a: 1}
diff --git a/Assets/Resources/Materials/xMark.mat b/Assets/Resources/Materials/xMarkLeft.mat
similarity index 85%
rename from Assets/Resources/Materials/xMark.mat
rename to Assets/Resources/Materials/xMarkLeft.mat
index 0b18871..ad509ab 100644
--- a/Assets/Resources/Materials/xMark.mat
+++ b/Assets/Resources/Materials/xMarkLeft.mat
@@ -2,16 +2,15 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
- serializedVersion: 6
+ serializedVersion: 5
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
- m_Name: xMark
- m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0}
+ m_Name: xMarkLeft
+ m_Shader: {fileID: 4800000, guid: bb0f298d1fd9ff24c8aed06d334c0b1f, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
- stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
@@ -19,7 +18,7 @@ Material:
first:
name: _MainTex
second:
- m_Texture: {fileID: 2800000, guid: 84643d1735e87de44889f90b3540c999, type: 3}
+ m_Texture: {fileID: 2800000, guid: efd71283395b4f7468fd7cd652d22155, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
@@ -79,6 +78,10 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
+ data:
+ first:
+ name: _Cutoff
+ second: .5
data:
first:
name: _SrcBlend
@@ -87,10 +90,6 @@ Material:
first:
name: _DstBlend
second: 0
- data:
- first:
- name: _Cutoff
- second: .5
data:
first:
name: _Parallax
@@ -127,6 +126,10 @@ Material:
first:
name: _Metallic
second: 0
+ data:
+ first:
+ name: _Ratio
+ second: 0
m_Colors:
data:
first:
@@ -136,3 +139,11 @@ Material:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
+ data:
+ first:
+ name: _CompletedColor
+ second: {r: 1, g: 1, b: 1, a: 1}
+ data:
+ first:
+ name: _RemainingColor
+ second: {r: 1, g: 1, b: 1, a: 0}
diff --git a/Assets/Resources/Materials/xMark.mat.meta b/Assets/Resources/Materials/xMarkLeft.mat.meta
similarity index 100%
rename from Assets/Resources/Materials/xMark.mat.meta
rename to Assets/Resources/Materials/xMarkLeft.mat.meta
diff --git a/Assets/Resources/Materials/xMarkLeft.png b/Assets/Resources/Materials/xMarkLeft.png
new file mode 100644
index 0000000..84b0706
Binary files /dev/null and b/Assets/Resources/Materials/xMarkLeft.png differ
diff --git a/Assets/Resources/Materials/xMarkLeft.png.meta b/Assets/Resources/Materials/xMarkLeft.png.meta
new file mode 100644
index 0000000..6b5c551
--- /dev/null
+++ b/Assets/Resources/Materials/xMarkLeft.png.meta
@@ -0,0 +1,55 @@
+fileFormatVersion: 2
+guid: efd71283395b4f7468fd7cd652d22155
+timeCreated: 1439738572
+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: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ cubemapConvolution: 0
+ cubemapConvolutionSteps: 8
+ 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
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: .5, y: .5}
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spritePixelsToUnits: 100
+ alphaIsTransparency: 1
+ textureType: -1
+ buildTargetSettings: []
+ spriteSheet:
+ sprites: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Materials/xMarkRight.mat b/Assets/Resources/Materials/xMarkRight.mat
new file mode 100644
index 0000000..326e285
--- /dev/null
+++ b/Assets/Resources/Materials/xMarkRight.mat
@@ -0,0 +1,149 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!21 &2100000
+Material:
+ serializedVersion: 5
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 0}
+ m_Name: xMarkRight
+ m_Shader: {fileID: 4800000, guid: b0aba77b532f48a48b23f8b41fbe3bcd, type: 3}
+ m_ShaderKeywords:
+ m_LightmapFlags: 5
+ m_CustomRenderQueue: -1
+ m_SavedProperties:
+ serializedVersion: 2
+ m_TexEnvs:
+ data:
+ first:
+ name: _MainTex
+ second:
+ m_Texture: {fileID: 2800000, guid: 0fd4daec51f3afd48a2410f5fe9a02af, type: 3}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ data:
+ first:
+ name: _BumpMap
+ second:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ data:
+ first:
+ name: _DetailNormalMap
+ second:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ data:
+ first:
+ name: _ParallaxMap
+ second:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ data:
+ first:
+ name: _OcclusionMap
+ second:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ data:
+ first:
+ name: _EmissionMap
+ second:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ data:
+ first:
+ name: _DetailMask
+ second:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ data:
+ first:
+ name: _DetailAlbedoMap
+ second:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ data:
+ first:
+ name: _MetallicGlossMap
+ second:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ m_Floats:
+ data:
+ first:
+ name: _Cutoff
+ second: .5
+ data:
+ first:
+ name: _SrcBlend
+ second: 1
+ data:
+ first:
+ name: _DstBlend
+ second: 0
+ data:
+ first:
+ name: _Parallax
+ second: .0199999996
+ data:
+ first:
+ name: _ZWrite
+ second: 1
+ data:
+ first:
+ name: _Glossiness
+ second: .5
+ data:
+ first:
+ name: _BumpScale
+ second: 1
+ data:
+ first:
+ name: _OcclusionStrength
+ second: 1
+ data:
+ first:
+ name: _DetailNormalMapScale
+ second: 1
+ data:
+ first:
+ name: _UVSec
+ second: 0
+ data:
+ first:
+ name: _Mode
+ second: 0
+ data:
+ first:
+ name: _Metallic
+ second: 0
+ data:
+ first:
+ name: _Ratio
+ second: 0
+ m_Colors:
+ data:
+ first:
+ name: _EmissionColor
+ second: {r: 0, g: 0, b: 0, a: 1}
+ data:
+ first:
+ name: _Color
+ second: {r: 1, g: 1, b: 1, a: 1}
+ data:
+ first:
+ name: _CompletedColor
+ second: {r: 1, g: 1, b: 1, a: 1}
+ data:
+ first:
+ name: _RemainingColor
+ second: {r: 1, g: 1, b: 1, a: 0}
diff --git a/Assets/Resources/Materials/xMarkRight.mat.meta b/Assets/Resources/Materials/xMarkRight.mat.meta
new file mode 100644
index 0000000..2fb7568
--- /dev/null
+++ b/Assets/Resources/Materials/xMarkRight.mat.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 65515d5275108d64f993d24ce2e0e11d
+timeCreated: 1439740902
+licenseType: Free
+NativeFormatImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Materials/xMarkRight.png b/Assets/Resources/Materials/xMarkRight.png
new file mode 100644
index 0000000..afe1f49
Binary files /dev/null and b/Assets/Resources/Materials/xMarkRight.png differ
diff --git a/Assets/Resources/Materials/xMarkRight.png.meta b/Assets/Resources/Materials/xMarkRight.png.meta
new file mode 100644
index 0000000..03bebdf
--- /dev/null
+++ b/Assets/Resources/Materials/xMarkRight.png.meta
@@ -0,0 +1,55 @@
+fileFormatVersion: 2
+guid: 0fd4daec51f3afd48a2410f5fe9a02af
+timeCreated: 1439738554
+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: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ cubemapConvolution: 0
+ cubemapConvolutionSteps: 8
+ 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
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: .5, y: .5}
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spritePixelsToUnits: 100
+ alphaIsTransparency: 1
+ textureType: 0
+ buildTargetSettings: []
+ spriteSheet:
+ sprites: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/NetworkingSphere.cs b/Assets/Scripts/NetworkingSphere.cs
index 2742374..df3fb95 100644
--- a/Assets/Scripts/NetworkingSphere.cs
+++ b/Assets/Scripts/NetworkingSphere.cs
@@ -149,15 +149,18 @@ public class NetworkingSphere : MonoBehaviour
private void OnNodeClicked(PersonNode node)
{
+ rb.angularVelocity = Vector3.zero;
+
if (_selectedNode != null)
{
_selectedNode.Select(false);
}
- if (_selectedNode != node)
+ if (!_isRotatingTowardsNode || node != _selectedNode)
{
FocusOnNode(node);
}
+
/*
if (_timeSinceLastClick < 0.5f && node == _selectedNode)
diff --git a/Assets/Scripts/PersonNode.cs b/Assets/Scripts/PersonNode.cs
index 3c79943..9f2359e 100644
--- a/Assets/Scripts/PersonNode.cs
+++ b/Assets/Scripts/PersonNode.cs
@@ -20,7 +20,9 @@ public class PersonNode : MonoBehaviour, IObserver
public Color EndColor = Color.red;
public Renderer internQuad;
- public Renderer xQuad;
+ public float KillHoldDuration = 2f;
+ public RatioProgression xMarkLeft;
+ public RatioProgression xMarkRight;
private List _links;
private bool _highlighted = false;
@@ -30,6 +32,8 @@ public class PersonNode : MonoBehaviour, IObserver
private Renderer _renderer;
private Transform _transform;
+ private float _holdDuration;
+
public Person Model
{
get { return _model; }
@@ -113,12 +117,10 @@ public class PersonNode : MonoBehaviour, IObserver
//If dead -> set offline until all friends are aware, then add a big red X to profile pic
if (_model.Alive)
{
- xQuad.enabled = false;
SetColors();
}
else
{
- xQuad.enabled = true;
gameObject.GetComponent().material.color = new Color32(50, 50, 50, 1);
UpdateLinks(false);
}
@@ -168,10 +170,38 @@ public class PersonNode : MonoBehaviour, IObserver
void OnMouseDown()
{
+ _holdDuration = 0f;
+
// The sphere should be subscribed to this event and update the data accordingly
if (OnClicked != null)
{
OnClicked(this);
}
}
+
+ void OnMouseDrag()
+ {
+ if (!_model.Alive) return;
+
+ Debug.Log(_model.Alive);
+
+ _holdDuration += Time.deltaTime;
+
+ xMarkLeft.SetCompletedRatio(Mathf.Clamp(_holdDuration - 0.025f, 0f, 1f));
+ xMarkRight.SetCompletedRatio(Mathf.Clamp(_holdDuration - 1.025f, 0f, 1f));
+
+ if (_holdDuration >= KillHoldDuration)
+ {
+ Kill();
+ }
+ }
+
+ void OnMouseUp()
+ {
+ if (_model.Alive)
+ {
+ xMarkLeft.SetCompletedRatio(0f);
+ xMarkRight.SetCompletedRatio(0f);
+ }
+ }
}
diff --git a/Assets/Shaders/RatioProgression/RatioProgressionDiagonalLeft.shader b/Assets/Shaders/RatioProgression/RatioProgressionDiagonalLeft.shader
new file mode 100644
index 0000000..6af864d
--- /dev/null
+++ b/Assets/Shaders/RatioProgression/RatioProgressionDiagonalLeft.shader
@@ -0,0 +1,86 @@
+// http://wiki.unity3d.com/index.php?title=Shader_Code
+
+Shader "Pat Shaders/RatioProgressionDiagonalLeft"
+{
+ Properties
+ {
+ _CompletedColor ("Completed Tint", Color) = (0,0,0,0)
+ _RemainingColor ("Remaining Tint", Color) = (1,1,1,1)
+
+ _MainTex ("Texture", 2D) = "white" {}
+
+ _Ratio ("Ratio", Range(0,1)) = 0.5
+ }
+
+ SubShader
+ {
+ // http://docs.unity3d.com/460/Documentation/Manual/SL-SubshaderTags.html
+ Tags
+ {
+ "Queue"="Transparent-1"
+
+ }
+
+ // http://docs.unity3d.com/Manual/SL-Blend.html
+ Blend One OneMinusSrcAlpha
+
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert
+ #pragma fragment frag
+
+ fixed4 _CompletedColor;
+ fixed4 _RemainingColor;
+ float _Ratio;
+ sampler2D _MainTex;
+
+ // Data transferred from application to vertex program
+ struct vertexInput
+ {
+ float4 vertex : POSITION;
+ float2 texcoord0 : TEXCOORD0; // Normalized, from 0 to 1
+ };
+
+ // Data transferred from vertex program to fragment program
+ struct fragmentInput
+ {
+ float4 position : SV_POSITION;
+ float2 texcoord0 : TEXCOORD0; // Normalized, from 0 to 1
+ };
+
+ // Vertex program
+ fragmentInput vert(vertexInput i)
+ {
+ fragmentInput o;
+
+ o.position = mul(UNITY_MATRIX_MVP, i.vertex); // Model*View*Projection matrix
+ o.texcoord0 = i.texcoord0;
+
+ return o;
+ }
+
+ // Fragment program
+ fixed4 frag(fragmentInput i) : COLOR
+ {
+ float4 color;
+
+ if (i.texcoord0.x <= _Ratio && i.texcoord0.y >= 1 - _Ratio)
+ {
+ color = tex2D(_MainTex, i.texcoord0) * _CompletedColor;
+ }
+ else
+ {
+ color = tex2D(_MainTex, i.texcoord0) * _RemainingColor;
+ }
+
+ color.rgb = color.rgb * color.a;
+
+ return color;
+ }
+
+ ENDCG
+ }
+ }
+}
diff --git a/Assets/Shaders/RatioProgression/RatioProgressionDiagonalLeft.shader.meta b/Assets/Shaders/RatioProgression/RatioProgressionDiagonalLeft.shader.meta
new file mode 100644
index 0000000..0a1d39d
--- /dev/null
+++ b/Assets/Shaders/RatioProgression/RatioProgressionDiagonalLeft.shader.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: bb0f298d1fd9ff24c8aed06d334c0b1f
+timeCreated: 1439740748
+licenseType: Free
+ShaderImporter:
+ defaultTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Shaders/RatioProgression/RatioProgressionDiagonalRight.shader b/Assets/Shaders/RatioProgression/RatioProgressionDiagonalRight.shader
new file mode 100644
index 0000000..ba506b8
--- /dev/null
+++ b/Assets/Shaders/RatioProgression/RatioProgressionDiagonalRight.shader
@@ -0,0 +1,86 @@
+// http://wiki.unity3d.com/index.php?title=Shader_Code
+
+Shader "Pat Shaders/RatioProgressionDiagonalRight"
+{
+ Properties
+ {
+ _CompletedColor ("Completed Tint", Color) = (0,0,0,0)
+ _RemainingColor ("Remaining Tint", Color) = (1,1,1,1)
+
+ _MainTex ("Texture", 2D) = "white" {}
+
+ _Ratio ("Ratio", Range(0,1)) = 0.5
+ }
+
+ SubShader
+ {
+ // http://docs.unity3d.com/460/Documentation/Manual/SL-SubshaderTags.html
+ Tags
+ {
+ "Queue"="Transparent-1"
+
+ }
+
+ // http://docs.unity3d.com/Manual/SL-Blend.html
+ Blend One OneMinusSrcAlpha
+
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert
+ #pragma fragment frag
+
+ fixed4 _CompletedColor;
+ fixed4 _RemainingColor;
+ float _Ratio;
+ sampler2D _MainTex;
+
+ // Data transferred from application to vertex program
+ struct vertexInput
+ {
+ float4 vertex : POSITION;
+ float2 texcoord0 : TEXCOORD0; // Normalized, from 0 to 1
+ };
+
+ // Data transferred from vertex program to fragment program
+ struct fragmentInput
+ {
+ float4 position : SV_POSITION;
+ float2 texcoord0 : TEXCOORD0; // Normalized, from 0 to 1
+ };
+
+ // Vertex program
+ fragmentInput vert(vertexInput i)
+ {
+ fragmentInput o;
+
+ o.position = mul(UNITY_MATRIX_MVP, i.vertex); // Model*View*Projection matrix
+ o.texcoord0 = i.texcoord0;
+
+ return o;
+ }
+
+ // Fragment program
+ fixed4 frag(fragmentInput i) : COLOR
+ {
+ float4 color;
+
+ if (i.texcoord0.x >= 1 - _Ratio && i.texcoord0.y >= 1 - _Ratio)
+ {
+ color = tex2D(_MainTex, i.texcoord0) * _CompletedColor;
+ }
+ else
+ {
+ color = tex2D(_MainTex, i.texcoord0) * _RemainingColor;
+ }
+
+ color.rgb = color.rgb * color.a;
+
+ return color;
+ }
+
+ ENDCG
+ }
+ }
+}
diff --git a/Assets/Shaders/RatioProgression/RatioProgressionDiagonalRight.shader.meta b/Assets/Shaders/RatioProgression/RatioProgressionDiagonalRight.shader.meta
new file mode 100644
index 0000000..b7f7d97
--- /dev/null
+++ b/Assets/Shaders/RatioProgression/RatioProgressionDiagonalRight.shader.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: b0aba77b532f48a48b23f8b41fbe3bcd
+timeCreated: 1439740921
+licenseType: Free
+ShaderImporter:
+ defaultTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index 84deb8f..dd32a95 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -3,14 +3,17 @@
--- !u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
- serializedVersion: 7
+ serializedVersion: 6
AndroidProfiler: 0
defaultScreenOrientation: 4
targetDevice: 2
+ targetGlesGraphics: -1
+ targetIOSGraphics: -1
targetResolution: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: DeathBook
+ cloudProjectId:
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_ShowUnitySplashScreen: 1
@@ -23,6 +26,7 @@ PlayerSettings:
m_ActiveColorSpace: 0
m_MTRendering: 1
m_MobileMTRendering: 0
+ m_UseDX11: 1
m_Stereoscopic3D: 0
iosShowActivityIndicatorOnLoading: -1
androidShowActivityIndicatorOnLoading: -1
@@ -77,7 +81,6 @@ PlayerSettings:
metroEnableIndependentInputSource: 0
metroEnableLowLatencyPresentationAPI: 0
xboxOneDisableKinectGpuReservation: 0
- virtualRealitySupported: 0
productGUID: 402278fad2098ce4eab29439139ae9ad
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 9
@@ -120,7 +123,6 @@ PlayerSettings:
iOSLaunchScreenCustomXibPath:
AndroidTargetDevice: 0
AndroidSplashScreenScale: 0
- androidSplashScreen: {fileID: 0}
AndroidKeystoreName:
AndroidKeyaliasName:
AndroidTVCompatibility: 1
@@ -134,7 +136,6 @@ PlayerSettings:
resolutionDialogBanner: {fileID: 0}
m_BuildTargetIcons: []
m_BuildTargetBatching: []
- m_BuildTargetGraphicsAPIs: []
webPlayerTemplate: APPLICATION:Default
m_TemplateCustomTags: {}
actionOnDotNetUnhandledException: 1
@@ -196,7 +197,6 @@ PlayerSettings:
ps4ApplicationParam2: 0
ps4ApplicationParam3: 0
ps4ApplicationParam4: 0
- ps4GarlicHeapSize: 2048
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
ps4pnSessions: 1
ps4pnPresence: 1
@@ -339,7 +339,8 @@ PlayerSettings:
blackberrySquareSplashScreen: {fileID: 0}
tizenProductDescription:
tizenProductURL:
- tizenSigningProfileName:
+ tizenCertificatePath:
+ tizenCertificatePassword:
tizenGPSPermissions: 0
tizenMicrophonePermissions: 0
stvDeviceAddress:
@@ -397,9 +398,4 @@ PlayerSettings:
- WebGL::template
WebGL::emscriptenArgs:
WebGL::template: APPLICATION:Default
- firstStreamedSceneWithResources: 0
- cloudProjectId:
- projectId:
- projectName:
- organizationId:
- cloudEnabled: 0
+ firstStreamedLevelWithResources: 0