Updated rendering
Made +1 score on ring destruction
This commit is contained in:
@@ -8,7 +8,7 @@ Material:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: GreenMat
|
m_Name: GreenMat
|
||||||
m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
m_Parent: {fileID: 0}
|
m_Parent: {fileID: 0}
|
||||||
m_ModifiedSerializedProperties: 0
|
m_ModifiedSerializedProperties: 0
|
||||||
m_ValidKeywords: []
|
m_ValidKeywords: []
|
||||||
@@ -23,6 +23,10 @@ Material:
|
|||||||
m_SavedProperties:
|
m_SavedProperties:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TexEnvs:
|
m_TexEnvs:
|
||||||
|
- _AlphaTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
- _BumpMap:
|
- _BumpMap:
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
@@ -61,11 +65,13 @@ Material:
|
|||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
m_Ints: []
|
m_Ints: []
|
||||||
m_Floats:
|
m_Floats:
|
||||||
|
- PixelSnap: 0
|
||||||
- _BumpScale: 1
|
- _BumpScale: 1
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _Cutoff: 0.5
|
- _Cutoff: 0.5
|
||||||
- _DetailNormalMapScale: 1
|
- _DetailNormalMapScale: 1
|
||||||
- _DstBlend: 0
|
- _DstBlend: 0
|
||||||
|
- _EnableExternalAlpha: 0
|
||||||
- _GlossMapScale: 1
|
- _GlossMapScale: 1
|
||||||
- _Glossiness: 0.5
|
- _Glossiness: 0.5
|
||||||
- _GlossyReflections: 1
|
- _GlossyReflections: 1
|
||||||
@@ -87,4 +93,6 @@ Material:
|
|||||||
m_Colors:
|
m_Colors:
|
||||||
- _Color: {r: 0, g: 1, b: 0, a: 1}
|
- _Color: {r: 0, g: 1, b: 0, a: 1}
|
||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Material:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: RedMat
|
m_Name: RedMat
|
||||||
m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
m_Parent: {fileID: 0}
|
m_Parent: {fileID: 0}
|
||||||
m_ModifiedSerializedProperties: 0
|
m_ModifiedSerializedProperties: 0
|
||||||
m_ValidKeywords: []
|
m_ValidKeywords: []
|
||||||
@@ -23,6 +23,10 @@ Material:
|
|||||||
m_SavedProperties:
|
m_SavedProperties:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TexEnvs:
|
m_TexEnvs:
|
||||||
|
- _AlphaTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
- _BumpMap:
|
- _BumpMap:
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
@@ -61,11 +65,13 @@ Material:
|
|||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
m_Ints: []
|
m_Ints: []
|
||||||
m_Floats:
|
m_Floats:
|
||||||
|
- PixelSnap: 0
|
||||||
- _BumpScale: 1
|
- _BumpScale: 1
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _Cutoff: 0.5
|
- _Cutoff: 0.5
|
||||||
- _DetailNormalMapScale: 1
|
- _DetailNormalMapScale: 1
|
||||||
- _DstBlend: 0
|
- _DstBlend: 0
|
||||||
|
- _EnableExternalAlpha: 0
|
||||||
- _GlossMapScale: 1
|
- _GlossMapScale: 1
|
||||||
- _Glossiness: 0.5
|
- _Glossiness: 0.5
|
||||||
- _GlossyReflections: 1
|
- _GlossyReflections: 1
|
||||||
@@ -87,4 +93,6 @@ Material:
|
|||||||
m_Colors:
|
m_Colors:
|
||||||
- _Color: {r: 1, g: 0, b: 0, a: 1}
|
- _Color: {r: 1, g: 0, b: 0, a: 1}
|
||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ Camera:
|
|||||||
width: 1
|
width: 1
|
||||||
height: 1
|
height: 1
|
||||||
near clip plane: 0.3
|
near clip plane: 0.3
|
||||||
far clip plane: 1000
|
far clip plane: 25
|
||||||
field of view: 60
|
field of view: 60
|
||||||
orthographic: 1
|
orthographic: 1
|
||||||
orthographic size: 5
|
orthographic size: 5
|
||||||
@@ -571,7 +571,7 @@ MonoBehaviour:
|
|||||||
m_HorizontalOverflow: 1
|
m_HorizontalOverflow: 1
|
||||||
m_VerticalOverflow: 1
|
m_VerticalOverflow: 1
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: 65536
|
m_Text: 0
|
||||||
--- !u!222 &1501855169
|
--- !u!222 &1501855169
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -142,13 +142,23 @@ public class GlobalOrbitalPositionManager : MonoBehaviour
|
|||||||
LineRenderer lineRenderer = ring.GetComponentInChildren<LineRenderer>();
|
LineRenderer lineRenderer = ring.GetComponentInChildren<LineRenderer>();
|
||||||
for (int vert = 0; vert < CirclePoints; vert++)
|
for (int vert = 0; vert < CirclePoints; vert++)
|
||||||
{
|
{
|
||||||
lineRenderer.SetPosition(vert, m_PrecalculatedPositions[vert] * ring.transform.localScale.x);
|
lineRenderer.SetPosition(vert, new Vector3
|
||||||
|
(
|
||||||
|
x: m_PrecalculatedPositions[vert].x * ring.transform.localScale.x,
|
||||||
|
y: m_PrecalculatedPositions[vert].y * ring.transform.localScale.y,
|
||||||
|
z: 10
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
float lerp = (ring.transform.localScale.x - 0.5f) / 4f;
|
float lerp = (ring.transform.localScale.x - 0.5f) / 4f;
|
||||||
Color c = Color.Lerp(Color.black, Color.white, Mathf.Clamp01(lerp));
|
Color c = Color.Lerp(Color.black, Color.white, Mathf.Clamp01(lerp));
|
||||||
if (ring.transform.localScale.x < 0.5f)
|
if (ring.transform.localScale.x < 0.5f)
|
||||||
|
{
|
||||||
|
if (IsSimulationRunning)
|
||||||
|
PlayerController.PlayerScore++;
|
||||||
|
|
||||||
toRemove.Add(ring);
|
toRemove.Add(ring);
|
||||||
|
}
|
||||||
|
|
||||||
lineRenderer.startColor = c;
|
lineRenderer.startColor = c;
|
||||||
lineRenderer.endColor = c;
|
lineRenderer.endColor = c;
|
||||||
|
|||||||
Reference in New Issue
Block a user