Browse Source

New shader added + bug finally fixed

master
Bernard Laptop 5 years ago
parent
commit
761bdcfa0e
8 changed files with 19 additions and 83 deletions
  1. +0
    -8
      Assets/AmplifyShaderEditor/Examples/Official/CustomRTRain.meta
  2. +0
    -8
      Assets/AmplifyShaderEditor/Examples/Official/SimpleTerrain.meta
  3. +0
    -8
      Assets/AmplifyShaderEditor/Examples/Official/Substance.meta
  4. +0
    -8
      Assets/AmplifyShaderEditor/Examples/Official/Substance2018.meta
  5. +0
    -8
      Assets/AmplifyShaderEditor/Plugins/EditorResources/Templates/SRP.meta
  6. +7
    -29
      Assets/Prefabs/RealLocalPlayer.prefab
  7. +6
    -12
      Assets/Scipts/Timer.cs
  8. +6
    -2
      Assets/Scipts/UI/LobbyUIController.cs

+ 0
- 8
Assets/AmplifyShaderEditor/Examples/Official/CustomRTRain.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 917f314cd7500ab41a37e0c60edaf755
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 8
Assets/AmplifyShaderEditor/Examples/Official/SimpleTerrain.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: e14f9199031928442a76fcb851644355
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 8
Assets/AmplifyShaderEditor/Examples/Official/Substance.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 3a1c9292d8fac714e9091922355abcd7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 8
Assets/AmplifyShaderEditor/Examples/Official/Substance2018.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 50c3f69bf74856340867f04dd9288b24
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 8
Assets/AmplifyShaderEditor/Plugins/EditorResources/Templates/SRP.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: cc9e432e1a0a4764f80870c080173cb7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 7
- 29
Assets/Prefabs/RealLocalPlayer.prefab View File

@ -181,7 +181,6 @@ GameObject:
- component: {fileID: 4868926435011172} - component: {fileID: 4868926435011172}
- component: {fileID: 20517240490355034} - component: {fileID: 20517240490355034}
- component: {fileID: 81470123203253098} - component: {fileID: 81470123203253098}
- component: {fileID: 114609350113042662}
- component: {fileID: 114370246880146776} - component: {fileID: 114370246880146776}
- component: {fileID: 114869583592967362} - component: {fileID: 114869583592967362}
m_Layer: 0 m_Layer: 0
@ -972,7 +971,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1067952265812482} m_GameObject: {fileID: 1067952265812482}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: -23.816051, y: 755.3234, z: -496.93646}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 4293844690205904} - {fileID: 4293844690205904}
@ -1287,33 +1286,6 @@ MonoBehaviour:
m_BeforeTransparentBundles: [] m_BeforeTransparentBundles: []
m_BeforeStackBundles: [] m_BeforeStackBundles: []
m_AfterStackBundles: [] m_AfterStackBundles: []
--- !u!114 &114609350113042662
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1327932106731578}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5367b3334ceb84458088c8e4f026f0e, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowCamera: 0
FogVolumeResolution:
_BlendMode: 1
GenerateDepth: 1
_Downsample: 1
_showBilateralEdge: 0
_useBilateralUpsampling: 1
_upsampleMode: 1
upsampleDepthThreshold: 0.00187
HDR: 1
TAA: 0
_TAA: {fileID: 0}
DepthLayer2: 1
lowProfileDepthRT: []
lowProfileDepthRRT: []
SceneBlur: 1
--- !u!114 &114869583592967362 --- !u!114 &114869583592967362
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -1359,6 +1331,7 @@ SkinnedMeshRenderer:
m_Materials: m_Materials:
- {fileID: 2100002, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100002, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100004, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100004, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100000, guid: d6004bad2743f734a8d9d595aa7ac0df, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -1417,6 +1390,7 @@ SkinnedMeshRenderer:
- {fileID: 2100008, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100008, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100010, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100010, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100012, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100012, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100000, guid: d6004bad2743f734a8d9d595aa7ac0df, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -1477,6 +1451,7 @@ SkinnedMeshRenderer:
- {fileID: 2100000, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100000, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100004, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100004, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100002, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100002, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100000, guid: d6004bad2743f734a8d9d595aa7ac0df, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -1546,6 +1521,7 @@ SkinnedMeshRenderer:
m_RenderingLayerMask: 4294967295 m_RenderingLayerMask: 4294967295
m_Materials: m_Materials:
- {fileID: 2100006, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100006, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100000, guid: d6004bad2743f734a8d9d595aa7ac0df, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -1608,6 +1584,7 @@ SkinnedMeshRenderer:
m_RenderingLayerMask: 4294967295 m_RenderingLayerMask: 4294967295
m_Materials: m_Materials:
- {fileID: 2100008, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100008, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100000, guid: d6004bad2743f734a8d9d595aa7ac0df, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -1660,6 +1637,7 @@ SkinnedMeshRenderer:
m_RenderingLayerMask: 4294967295 m_RenderingLayerMask: 4294967295
m_Materials: m_Materials:
- {fileID: 2100000, guid: 236e7961efac5a74bb87438b563e964a, type: 3} - {fileID: 2100000, guid: 236e7961efac5a74bb87438b563e964a, type: 3}
- {fileID: 2100000, guid: d6004bad2743f734a8d9d595aa7ac0df, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0

+ 6
- 12
Assets/Scipts/Timer.cs View File

@ -12,11 +12,9 @@ public class Timer : MonoBehaviour {
public Transform Sun; public Transform Sun;
float curRot = 0; float curRot = 0;
public Color Dawn;
public Color Noon;
public float Dawn = 125; //FF7D00 125
public float Noon = 248; //FFF800 248
float DawnValue;
float NoonValue;
float colorDif; float colorDif;
Image SunImage; Image SunImage;
@ -25,10 +23,7 @@ public class Timer : MonoBehaviour {
void Start() void Start()
{ {
SunImage = Sun.gameObject.GetComponent<Image>(); SunImage = Sun.gameObject.GetComponent<Image>();
SunImage.color = Dawn;
DawnValue = Dawn.b;
NoonValue = Noon.b;
colorDif = Mathf.Abs(NoonValue - DawnValue);
colorDif = Mathf.Abs(Noon - Dawn);
} }
void Update () { void Update () {
@ -38,18 +33,17 @@ public class Timer : MonoBehaviour {
mode.PreGameLose(); mode.PreGameLose();
} }
Color newColor;
// Color newColor;
if (curTime > MaxTimer / 2) if (curTime > MaxTimer / 2)
{ {
newColor = new Color(SunImage.color.r, SunImage.color.g - colorDif * ((90 / MaxTimer) * Time.deltaTime), SunImage.color.b );
// newColor = new Color(SunImage.color.r, SunImage.color.g + SunImage.color.b);
} }
else else
{ {
newColor = new Color(SunImage.color.r, SunImage.color.g + colorDif * ((90 / MaxTimer) * Time.deltaTime), SunImage.color.b);
} }
SunImage.color = newColor;
// SunImage.color = newColor;
Sun.RotateAround(Pivot.transform.position, -1 * Sun.transform.forward, (180 / MaxTimer) * Time.deltaTime); Sun.RotateAround(Pivot.transform.position, -1 * Sun.transform.forward, (180 / MaxTimer) * Time.deltaTime);
} }

+ 6
- 2
Assets/Scipts/UI/LobbyUIController.cs View File

@ -4,9 +4,13 @@ using UnityEngine;
public class LobbyUIController : MonoBehaviour { public class LobbyUIController : MonoBehaviour {
public void OnClickStartGame()
private void Start()
{ {
Multiplayer.ClientManager.Instance.SendMessage(Multiplayer.PlayerMsgID.GameStart, new Multiplayer.PlayerMsg(Multiplayer.ClientManager.Instance.ID));
Multiplayer.PlayersManager.Instance.LocalPlayer.GetComponent<LocalPlayer>().heldVeggie = null; Multiplayer.PlayersManager.Instance.LocalPlayer.GetComponent<LocalPlayer>().heldVeggie = null;
}
public void OnClickStartGame()
{
Multiplayer.ClientManager.Instance.SendMessage(Multiplayer.PlayerMsgID.GameStart, new Multiplayer.PlayerMsg(Multiplayer.ClientManager.Instance.ID));
} }
} }

Loading…
Cancel
Save