Skip to content

Commit

Permalink
added new SFX + main theme by Clark Baxter
Browse files Browse the repository at this point in the history
  • Loading branch information
maxilevi committed Nov 11, 2017
1 parent 0b3c0b5 commit 3c16a4e
Show file tree
Hide file tree
Showing 22 changed files with 859 additions and 36 deletions.
7 changes: 5 additions & 2 deletions Assets/Explode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class Explode : MonoBehaviour
{

public AudioSource ExplosionAudio;
void Start(){
SplitMesh();
}
Expand Down Expand Up @@ -52,7 +52,10 @@ void SplitMesh ()
}
}
MR.enabled = false;

if (ExplosionAudio != null) {
AudioSource au = Instantiate<AudioSource> (ExplosionAudio, this.transform.position, Quaternion.identity);
Destroy (au, au.time + .5f);
}
Destroy(this.gameObject);
}
}
2 changes: 1 addition & 1 deletion Assets/FollowShip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class FollowShip : MonoBehaviour {
void Update () {
if (TargetShip == null)
return;
this.transform.position = Lerp (this.transform.position, TargetShip.transform.position + TargetShip.transform.forward * Offset.z + TargetShip.transform.up * Offset.y, Time.deltaTime * 16f);
this.transform.position = Lerp (this.transform.position, TargetShip.transform.position + TargetShip.transform.forward * Offset.z + TargetShip.transform.up * Offset.y, Time.deltaTime * 8f);
this.transform.LookAt(TargetShip.transform.position, Vector3.up);
//this.transform.rotation = Quaternion.Slerp(this.transform.rotation, TargetShip.transform.rotation, Time.deltaTime * 32f);
}
Expand Down
246 changes: 241 additions & 5 deletions Assets/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 0.2932077}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &729518483
MonoBehaviour:
Expand Down Expand Up @@ -525,6 +525,7 @@ MonoBehaviour:
StartBtn: {fileID: 787871392}
PlayerPrefab: {fileID: 1487220595160186, guid: de0cf47d47318e94483f1669ea325fe5,
type: 2}
Sound: {fileID: 1079132436}
--- !u!114 &747117604
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -601,7 +602,7 @@ RectTransform:
- {fileID: 1444885958}
- {fileID: 1174539138}
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
Expand Down Expand Up @@ -756,6 +757,90 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 802837267}
--- !u!1 &916663567
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 916663571}
- component: {fileID: 916663570}
- component: {fileID: 916663569}
- component: {fileID: 916663568}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &916663568
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 916663567}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &916663569
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 916663567}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &916663570
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 916663567}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &916663571
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 916663567}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 154}
m_LocalScale: {x: 15.267394, y: 15.26739, z: 15.26739}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1036811556
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -816,7 +901,116 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1079132435
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1079132437}
- component: {fileID: 1079132436}
m_Layer: 0
m_Name: Audio Source
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!82 &1079132436
AudioSource:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1079132435}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 649e4aa8ec6dc36409789a1a233bc387, type: 3}
m_PlayOnAwake: 1
m_Volume: 0.64
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
--- !u!4 &1079132437
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1079132435}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 314.9062, y: 278.22995, z: 1.037701}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1111598441
GameObject:
Expand Down Expand Up @@ -4217,7 +4411,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1138038812
GameObject:
Expand Down Expand Up @@ -4694,6 +4888,48 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1573136842}
--- !u!1001 &1723086487
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4329532083364398, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4329532083364398, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4329532083364398, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4329532083364398, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4329532083364398, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4329532083364398, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4329532083364398, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4329532083364398, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: de0cf47d47318e94483f1669ea325fe5, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1880731487
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -4738,7 +4974,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1880731490
MonoBehaviour:
Expand Down
2 changes: 1 addition & 1 deletion Assets/Generation/Chunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void Build()
_mesh.SetNormals (BlockData.Normals);
_mesh.SetColors (BlockData.Colors);
_mesh.SetIndices (BlockData.Indices.ToArray (), MeshTopology.Triangles, 0);
this.GetComponent<MeshCollider> ().sharedMesh = _mesh;
//this.GetComponent<MeshCollider> ().sharedMesh = _mesh;
});
}

Expand Down
8 changes: 4 additions & 4 deletions Assets/Generation/ChunkLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ChunkLoader : MonoBehaviour
private bool Stop;

void Awake(){
StartCoroutine (this.LoadChunks());
//StartCoroutine (this.LoadChunks());
StartCoroutine (this.ManageChunksMesh());

StartCoroutine(FogLerpCoroutine());
Expand Down Expand Up @@ -64,8 +64,8 @@ private IEnumerator FogLerpCoroutine()
{
_maxFog = Mathf.Lerp(_maxFog, _targetMax, Time.deltaTime * 8f);
_minFog = Mathf.Lerp(_minFog, _targetMin, Time.deltaTime * 8f);
RenderSettings.fogEndDistance = _maxFog;
RenderSettings.fogStartDistance = _minFog;
// RenderSettings.fogEndDistance = _maxFog;
// RenderSettings.fogStartDistance = _minFog;
}

yield return null;
Expand Down Expand Up @@ -109,7 +109,7 @@ private IEnumerator LoadChunks()
NewChunk.transform.SetParent(World.gameObject.transform);
NewChunk.AddComponent<MeshFilter>();
NewChunk.AddComponent<MeshRenderer>();
NewChunk.AddComponent<MeshCollider> ();
//NewChunk.AddComponent<MeshCollider> ();
Chunk chunk = NewChunk.AddComponent<Chunk>();
chunk.Init(chunkPos, World);
World.AddChunk(chunkPos, chunk);
Expand Down
Loading

0 comments on commit 3c16a4e

Please sign in to comment.