1
0
Fork 0

Merge remote-tracking branch 'origin/master'

This commit is contained in:
Triceraptodactyl 2018-04-23 23:09:49 +02:00
commit 55a0a24914
31 changed files with 14917 additions and 27 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1223,7 +1223,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 64.16286, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0.5}
--- !u!224 &224218339018349506

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 469f111ee663c824d97f618a355cf82e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -269,6 +269,131 @@ Transform:
m_Father: {fileID: 734498092}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &343165589
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 343165591}
- component: {fileID: 343165590}
m_Layer: 0
m_Name: hitplayer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!82 &343165590
AudioSource:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 343165589}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 243982397043704958, guid: efb934a745665924d8c7dd46c0a117ae,
type: 2}
m_audioClip: {fileID: 8300000, guid: 4202ee86a65d8654d9768a96c6f279ec, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
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: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!4 &343165591
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 343165589}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 816024605}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &368878859
GameObject:
m_ObjectHideFlags: 0
@ -308,7 +433,7 @@ AudioSource:
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 243067197919102372, guid: efb934a745665924d8c7dd46c0a117ae,
type: 2}
m_audioClip: {fileID: 8300000, guid: 249ce39c2e8ec0a47b85a280bc9f894f, type: 3}
m_audioClip: {fileID: 8300000, guid: a6dd0617592791d42b3ecdf5de08669e, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
@ -674,6 +799,52 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1001 &809524311
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4665188581213052, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4665188581213052, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4665188581213052, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4665188581213052, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4665188581213052, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4665188581213052, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4665188581213052, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4665188581213052, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_RootOrder
value: 7
objectReference: {fileID: 0}
- target: {fileID: 1887677565572348, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: dd625f75dbf83194392a299951cf04fb, type: 2}
m_IsPrefabParent: 0
--- !u!1 &816024604
GameObject:
m_ObjectHideFlags: 0
@ -707,6 +878,8 @@ Transform:
- {fileID: 2012930730}
- {fileID: 2060531169}
- {fileID: 1665413108}
- {fileID: 1015503429}
- {fileID: 343165591}
m_Father: {fileID: 734498092}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -882,6 +1055,8 @@ MonoBehaviour:
- {fileID: 2012930731}
- {fileID: 2060531170}
- {fileID: 1908750963}
- {fileID: 1015503430}
- {fileID: 343165590}
--- !u!1001 &934296221
Prefab:
m_ObjectHideFlags: 0
@ -934,6 +1109,131 @@ MonoBehaviour:
type: 2}
m_PrefabInternal: {fileID: 1379476068}
m_Script: {fileID: 11500000, guid: d819f21fefea9da4199b468cca99e711, type: 3}
--- !u!1 &1015503428
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1015503429}
- component: {fileID: 1015503430}
m_Layer: 0
m_Name: hitmob
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1015503429
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1015503428}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 816024605}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &1015503430
AudioSource:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1015503428}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 243525668539516054, guid: efb934a745665924d8c7dd46c0a117ae,
type: 2}
m_audioClip: {fileID: 8300000, guid: b6400dd0e4799764d801825d40a40c6f, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
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: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &1028937042
GameObject:
m_ObjectHideFlags: 0
@ -1159,7 +1459,7 @@ Prefab:
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 65.89836
value: 64.16286
objectReference: {fileID: 0}
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
type: 2}

View file

@ -800,6 +800,131 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &390756938
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 390756939}
- component: {fileID: 390756940}
m_Layer: 0
m_Name: hitplayer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &390756939
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 390756938}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1911841377}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &390756940
AudioSource:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 390756938}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 243982397043704958, guid: efb934a745665924d8c7dd46c0a117ae,
type: 2}
m_audioClip: {fileID: 8300000, guid: 4202ee86a65d8654d9768a96c6f279ec, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
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: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &429380404
GameObject:
m_ObjectHideFlags: 0
@ -1317,7 +1442,7 @@ AudioSource:
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 243067197919102372, guid: efb934a745665924d8c7dd46c0a117ae,
type: 2}
m_audioClip: {fileID: 8300000, guid: 249ce39c2e8ec0a47b85a280bc9f894f, type: 3}
m_audioClip: {fileID: 8300000, guid: a6dd0617592791d42b3ecdf5de08669e, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
@ -1904,7 +2029,7 @@ MonoBehaviour:
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.5943396, g: 0.08118772, b: 0.058873262, a: 1}
m_HighlightedColor: {r: 0.8392157, g: 0.8392157, b: 0.8392157, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
@ -1997,6 +2122,7 @@ MonoBehaviour:
notifications: {fileID: 0}
restartUIPanel: {fileID: 0}
healthcontroller: {fileID: 0}
brakeBarController: {fileID: 0}
mainMenuSceneIndex: 0
--- !u!1 &1586619316
GameObject:
@ -2181,6 +2307,131 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1671123311
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1671123312}
- component: {fileID: 1671123313}
m_Layer: 0
m_Name: hitmob
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1671123312
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1671123311}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1911841377}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &1671123313
AudioSource:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1671123311}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 243525668539516054, guid: efb934a745665924d8c7dd46c0a117ae,
type: 2}
m_audioClip: {fileID: 8300000, guid: b6400dd0e4799764d801825d40a40c6f, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
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: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &1911841376
GameObject:
m_ObjectHideFlags: 0
@ -2214,6 +2465,8 @@ Transform:
- {fileID: 114022017}
- {fileID: 272880426}
- {fileID: 2015154022}
- {fileID: 1671123312}
- {fileID: 390756939}
m_Father: {fileID: 1926562125}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -2431,7 +2684,7 @@ MonoBehaviour:
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.027450982, g: 0.5019608, b: 0.074938804, a: 1}
m_HighlightedColor: {r: 0.8396226, g: 0.8396226, b: 0.8396226, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
@ -2524,4 +2777,5 @@ MonoBehaviour:
notifications: {fileID: 0}
restartUIPanel: {fileID: 0}
healthcontroller: {fileID: 0}
brakeBarController: {fileID: 0}
mainMenuSceneIndex: 0

View file

@ -11,7 +11,7 @@ public class AudioControl : MonoBehaviour
public AudioSource gameovers;
public AudioSource[] soundeffects;
public enum Sfx { shoot, explosion, mobattack, door, faster, slower, driving, slowdriving };
public enum Sfx { shoot, explosion, mobattack, door, faster, slower, driving, slowdriving, hitmob, hitplayer };
private const float lvlbgm = 5.725f;
private const float gobgm = 14.406f;
@ -21,7 +21,6 @@ public class AudioControl : MonoBehaviour
// Use this for initialization
void Start()
{
maintheme.time = maintheme.clip.length - 3.0f;
maintheme.loop = true;
menutheme.loop = true;
gameovers.loop = true;

View file

@ -0,0 +1,19 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Destroyer : MonoBehaviour {
ParticleSystem ps;
// Use this for initialization
void Start () {
ps = GetComponent<ParticleSystem>();
ps.Play();
}
// Update is called once per frame
void Update () {
if(ps != null && !ps.isPlaying) {
Destroy(this.gameObject);
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1a9a1f70c735c4346b1fc5dc2ed6571d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -25,9 +25,11 @@ namespace Assets.Scripts.Entities {
}
protected virtual void Start() {
ParticleSystem ps = GetComponentInChildren<ParticleSystem>();
if(ps != null && ps.name == "spawn") {
ps.Play();
ParticleSystem[] pss = GetComponentsInChildren<ParticleSystem>();
foreach(ParticleSystem ps in pss) {
if ( ps.gameObject.name == "spawn" ) {
ps.Play();
}
}
}

View file

@ -43,6 +43,15 @@ public abstract class Mob : Entity {
if ( objective != null )
objective.RemoveEntity(this);
GameController.instance.GetAudioControl().SfxPlay(AudioControl.Sfx.explosion);
ParticleSystem[] pss = GetComponentsInChildren<ParticleSystem>(true);
foreach ( ParticleSystem ps in pss ) {
if ( ps.gameObject.name == "despawn" ) {
GameObject tmp = Instantiate(ps.gameObject);
tmp.transform.position = transform.position;
tmp.SetActive(true);
}
}
Destroy(gameObject);
}

View file

@ -283,16 +283,18 @@ public class GameController : MonoBehaviour {
StartObjective goal = new StartObjective(start, playerPrefab);
start.SetObjective(goal);
start.OnPlayerEnter(player);
player = goal.GetPlayer();
player = goal.GetPlayer();
cam.GetComponent<AudioControl>().LevelBgm();
if ( player != null ) {
cam.GetComponent<CameraControl>().SetFollow(player.gameObject);
GetUI().InitHealthController(player);
GetUI().InitBrakeController(player);
} else {
Debug.Log("No Player spawned!");
}
}
finish.SetObjective(new FinishObjective(finish));
cam.GetComponent<AudioControl>().LevelBgm();
}
private void Running() {

View file

@ -6,26 +6,36 @@ public class HealthbarController : MonoBehaviour {
float currentRotation;
float maxRotation;
private Player player;
Player player;
// Update is called once per frame
void Update()
{
// if player alive and spawned
if (player != null)
{
{
Debug.Log(player.GetHealth());
UpdatePointer(player.GetHealth());
}
else
{
//if player dead or not spawned
UpdatePointer(0);
}
}
void UpdatePointer(float playerLife) {
float offset = playerLife - currentRotation;
float offset;
if (player == null) {
currentRotation = 0;
offset = 0;
Debug.Log("Player not found");
} else {
Debug.Log("calculated offset");
offset = ((playerLife / maxRotation) * 100) - currentRotation;
}
gameObject.transform.Rotate(Vector3.forward, offset);
currentRotation += offset;
}
@ -33,6 +43,7 @@ public class HealthbarController : MonoBehaviour {
public void SetPlayer(Player ply) {
player = ply;
maxRotation = player.GetMaxHealth();
currentRotation = player.GetHealth();
//currentRotation = (player.GetHealth() / maxRotation) * 100;
Debug.Log("Set Player");
}
}

View file

@ -40,8 +40,6 @@ public class NotificationManager : MonoBehaviour {
void Update() {
if ( showingMessage ) {
if ( Time.time > delay ) {
Debug.Log(delay - Time.time);
Debug.Log(messages.Count);
if (messages.Count == 1) {
messages.Remove(messages[0]);
Hide();

View file

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

View file

@ -0,0 +1,83 @@
%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: Flames
m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 4
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: 2800000, guid: 390eba5510448e245bd1b27b9c0009f1, type: 3}
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
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0.5529412}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6a21764f056428a42b455751935fe9f4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

View file

@ -0,0 +1,84 @@
fileFormatVersion: 2
guid: 2e7f2dc867375fd4b9363011bd09b68b
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 3dafb191a03dd8644b37692280d7f705
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -0,0 +1,84 @@
fileFormatVersion: 2
guid: aef4053338277214c9f32a70117fa370
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 2e473ab664d26eb458dd02ab62524841
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -31,6 +31,8 @@ AudioMixerController:
- 8783d2948d71b9d469384aea903ce55c
- 3fcf75061f55ae640990a5d2e32b20fe
- 6640809a565deef43b1954590fb1bcfe
- d8ab6d51d2cd3a446ad38c4726e13bad
- a2584e0772cc6d0458bce04a4f8f5662
name: View
m_CurrentViewIndex: 0
m_TargetSnapshot: {fileID: 24500006}
@ -76,7 +78,7 @@ AudioMixerSnapshotController:
m_SnapshotID: d3789ccdbdc046a448f1887d94c3f7f5
m_FloatValues:
25123d234de4ec84aafee1d0c380f3ad: 0.025578512
7e224658afaf14242ba3996793ac12a1: -7.436929
7e224658afaf14242ba3996793ac12a1: -0.025776558
m_TransitionOverrides: {}
--- !u!243 &243021022379401452
AudioMixerGroupController:
@ -214,6 +216,23 @@ AudioMixerGroupController:
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!243 &243525668539516054
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hitmob
m_AudioMixer: {fileID: 24100000}
m_GroupID: d8ab6d51d2cd3a446ad38c4726e13bad
m_Children: []
m_Volume: 8b04b72683f112d418bf818b2395ba51
m_Pitch: 1ea4e92c839a59f45bedc9e56d2ff3d0
m_Effects:
- {fileID: 244650114490763724}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!243 &243542962245594584
AudioMixerGroupController:
m_ObjectHideFlags: 0
@ -250,6 +269,8 @@ AudioMixerGroupController:
- {fileID: 243021022379401452}
- {fileID: 243229718110042718}
- {fileID: 243257092868039642}
- {fileID: 243525668539516054}
- {fileID: 243982397043704958}
m_Volume: bb7239234bfe40f409abe7c8da078444
m_Pitch: 3add7831cf75dd0468538de15eeb2617
m_Effects:
@ -292,6 +313,23 @@ AudioMixerGroupController:
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!243 &243982397043704958
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hitplayer
m_AudioMixer: {fileID: 24100000}
m_GroupID: a2584e0772cc6d0458bce04a4f8f5662
m_Children: []
m_Volume: 9f873922b4189f746a4d13a9b60e6375
m_Pitch: aa179eafbd063ef42886942d22848f2b
m_Effects:
- {fileID: 244647815560773474}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &244137845338416878
AudioMixerEffectController:
m_ObjectHideFlags: 3
@ -396,6 +434,32 @@ AudioMixerEffectController:
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!244 &244647815560773474
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_EffectID: f88090193639a634a97412686dfe1852
m_EffectName: Attenuation
m_MixLevel: fe2a6821890f5cd428327e6170f40e92
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!244 &244650114490763724
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_EffectID: 206d993bd8ff0d2408761558462de7e3
m_EffectName: Attenuation
m_MixLevel: 6770303860e655e44a32f8f3266fb8f8
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!244 &244932309018270998
AudioMixerEffectController:
m_ObjectHideFlags: 3

Binary file not shown.

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 249ce39c2e8ec0a47b85a280bc9f894f
guid: a6dd0617592791d42b3ecdf5de08669e
AudioImporter:
externalObjects: {}
serializedVersion: 6

Binary file not shown.

BIN
Assets/sound/hit.wav Normal file

Binary file not shown.

22
Assets/sound/hit.wav.meta Normal file
View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 4202ee86a65d8654d9768a96c6f279ec
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/sound/hitmob.wav Normal file

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: b6400dd0e4799764d801825d40a40c6f
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant: