Bläddra i källkod

super gloooow

Niels 9 år sedan
förälder
incheckning
b7655aed1d

+ 76 - 0
game/Assets/3DArt/Materials/SuperGlow.mat

@@ -0,0 +1,76 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!21 &2100000
+Material:
+  serializedVersion: 6
+  m_ObjectHideFlags: 0
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 0}
+  m_Name: SuperGlow
+  m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
+  m_ShaderKeywords: _EMISSION
+  m_LightmapFlags: 0
+  m_EnableInstancingVariants: 0
+  m_DoubleSidedGI: 0
+  m_CustomRenderQueue: -1
+  stringTagMap: {}
+  disabledShaderPasses: []
+  m_SavedProperties:
+    serializedVersion: 3
+    m_TexEnvs:
+    - _BumpMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailAlbedoMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailMask:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailNormalMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _EmissionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MainTex:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MetallicGlossMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _OcclusionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _ParallaxMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    m_Floats:
+    - _BumpScale: 1
+    - _Cutoff: 0.5
+    - _DetailNormalMapScale: 1
+    - _DstBlend: 0
+    - _GlossMapScale: 1
+    - _Glossiness: 0.5
+    - _GlossyReflections: 1
+    - _Metallic: 0
+    - _Mode: 0
+    - _OcclusionStrength: 1
+    - _Parallax: 0.02
+    - _SmoothnessTextureChannel: 0
+    - _SpecularHighlights: 1
+    - _SrcBlend: 1
+    - _UVSec: 0
+    - _ZWrite: 1
+    m_Colors:
+    - _Color: {r: 0.16911763, g: 0.16911763, b: 0.16911763, a: 1}
+    - _EmissionColor: {r: 1.9062881, g: 2, b: 1.0294118, a: 1}

+ 9 - 0
game/Assets/3DArt/Materials/SuperGlow.mat.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: a3dc6f93b4a26054eaab223fab4c9af2
+timeCreated: 1501535830
+licenseType: Free
+NativeFormatImporter:
+  mainObjectFileID: 2100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 3
game/Assets/Materials/Robo_4.mat

@@ -60,9 +60,9 @@ Material:
     - _DetailNormalMapScale: 1
     - _DstBlend: 0
     - _GlossMapScale: 1
-    - _Glossiness: 0.5
+    - _Glossiness: 0.407
     - _GlossyReflections: 1
-    - _Metallic: 0
+    - _Metallic: 0.75
     - _Mode: 0
     - _OcclusionStrength: 1
     - _Parallax: 0.02
@@ -72,5 +72,5 @@ Material:
     - _UVSec: 0
     - _ZWrite: 1
     m_Colors:
-    - _Color: {r: 0.8774341, g: 0.8897059, b: 0, a: 1}
+    - _Color: {r: 0.60354745, g: 0.6102941, b: 0.121161334, a: 1}
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

+ 5 - 5
game/Assets/PostProcessingProfile.asset

@@ -101,8 +101,8 @@ MonoBehaviour:
     m_Settings:
       bloom:
         intensity: 1
-        threshold: 1.54
-        softKnee: 0.058
+        threshold: 1
+        softKnee: 0
         radius: 1
         antiFlicker: 1
       lensDirt:
@@ -289,9 +289,9 @@ MonoBehaviour:
     m_Enabled: 1
     m_Settings:
       colored: 0
-      intensity: 0.279
-      size: 0.65
-      luminanceContribution: 0.463
+      intensity: 1
+      size: 0.723
+      luminanceContribution: 1
   vignette:
     m_Enabled: 0
     m_Settings:

+ 1 - 1
game/Assets/Prefabs/Player.prefab

@@ -1900,7 +1900,7 @@ MonoBehaviour:
   lookSmoothingSeconds: 0.05
   cameraSmoothingSeconds: 0.8
   bulletUpBias: 0.1
-  bulletForce: 5
+  bulletForce: 2
   powerLevelMax: 20
   gunTransform: {fileID: 4475041197474250}
   bulletPrefab: {fileID: 54376493206981186, guid: b7a50776d2afe4da29c642bd08d6e556,

+ 1 - 1
game/Assets/Prefabs/Spinner.prefab

@@ -114,7 +114,7 @@ MeshRenderer:
   m_LightProbeUsage: 1
   m_ReflectionProbeUsage: 1
   m_Materials:
-  - {fileID: 2100000, guid: 9ab11714b79356448813f757518372d2, type: 2}
+  - {fileID: 2100000, guid: a3dc6f93b4a26054eaab223fab4c9af2, type: 2}
   m_StaticBatchInfo:
     firstSubMesh: 0
     subMeshCount: 0

+ 12 - 0
game/Assets/Scenes/Main.unity

@@ -2821,6 +2821,12 @@ MeshFilter:
   m_PrefabInternal: {fileID: 0}
   m_GameObject: {fileID: 814741110}
   m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!114 &837098851 stripped
+MonoBehaviour:
+  m_PrefabParentObject: {fileID: 114806071709842584, guid: 673629bba9f02458cacf9d13115e1078,
+    type: 2}
+  m_PrefabInternal: {fileID: 1890959033}
+  m_Script: {fileID: 11500000, guid: fa3a4f9ebf76b4ac2bc610f0f6b7d935, type: 3}
 --- !u!1 &837549786
 GameObject:
   m_ObjectHideFlags: 0
@@ -3985,6 +3991,11 @@ Prefab:
       propertyPath: m_RootOrder
       value: 2
       objectReference: {fileID: 0}
+    - target: {fileID: 114322613409989222, guid: e6383ffd9f8688f4a9ba9705843d54e2,
+        type: 2}
+      propertyPath: dayTimeManager
+      value: 
+      objectReference: {fileID: 837098851}
     m_RemovedComponents: []
   m_ParentPrefab: {fileID: 100100000, guid: e6383ffd9f8688f4a9ba9705843d54e2, type: 2}
   m_IsPrefabParent: 0
@@ -4090,6 +4101,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: ff26db721962cdf4a8edcdfa9a767d2a, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  profile: {fileID: 11400000, guid: 33391131f7192d242ab5e5f2b501c232, type: 2}
 --- !u!82 &1278158978
 AudioSource:
   m_ObjectHideFlags: 0

+ 3 - 1
game/Assets/Scripts/Enemy/Enemy.cs

@@ -139,7 +139,9 @@ public class Enemy : MonoBehaviour
         dead = true;
         weapon.gameObject.SetActive(false);
 
-        GetComponent<UnityEngine.AI.NavMeshAgent>().isStopped = true;
+        UnityEngine.AI.NavMeshAgent navMeshAgent = GetComponent<UnityEngine.AI.NavMeshAgent>();
+        if (navMeshAgent.isOnNavMesh)
+            navMeshAgent.isStopped = true;
 
         GameObject go = GameObject.Instantiate(powerDrop);
         go.GetComponent<PowerDrop>().powerAmount = power;

+ 22 - 4
game/Assets/Scripts/Player.cs

@@ -1,4 +1,5 @@
-using System.Collections;
+using System;
+using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
@@ -176,7 +177,9 @@ public class Player : MonoBehaviour
     public Transform gunTransform;
     public Rigidbody bulletPrefab;
     public Light muzzleLight;
+    public Light headLight;
     public Transform gauge;
+    public DayTimeManager dayTimeManager;
 
     private Vector3 inputDirection;
     private float speed;
@@ -195,6 +198,7 @@ public class Player : MonoBehaviour
         speed = startSpeed;
         cameraOffset = Camera.main.transform.position - transform.position;
         lightIntensity = muzzleLight.intensity;
+        muzzleLight.intensity = 0;
         var joystickNames = Input.GetJoystickNames();
         useMouseLook = joystickNames.Length == 0 || string.IsNullOrEmpty(joystickNames[0]);
         //if (useMouseLook)
@@ -240,12 +244,26 @@ public class Player : MonoBehaviour
         if (shooting)
         {
             Shoot();
-            muzzleLight.intensity = Random.Range(.5f, 2f) * lightIntensity;
+            StartCoroutine(FlashMuzzle());
         }
-        else
+
+        headLight.intensity =
+            (dayTimeManager.dayTimeLabel == DayTimeLabel.Night || dayTimeManager.dayTimeLabel == DayTimeLabel.Evening)
+            ? .5f
+            : 0;
+    }
+
+    private IEnumerator FlashMuzzle()
+    {
+        float start = .1f;
+        float initial = UnityEngine.Random.Range(.5f, 2f) * lightIntensity;
+
+        for (float left = start; left > 0; left -= Time.deltaTime)
         {
-            muzzleLight.intensity = 0;
+            muzzleLight.intensity = Mathf.Lerp(initial, 0, left / start);
+            yield return null;
         }
+        muzzleLight.intensity = 0;
     }
 
     public float fidgetSpin = 30.0f;