Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added player health
  • Loading branch information
ars17035 committed Feb 25, 2020
1 parent c3c27ea commit 4365931
Show file tree
Hide file tree
Showing 15 changed files with 492 additions and 197 deletions.
2 changes: 2 additions & 0 deletions Space Shooter/Assets/Prefabs/Asteroid.prefab
Expand Up @@ -150,3 +150,5 @@ MonoBehaviour:
playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
scoreValue: 10
health: 1
Player: {fileID: 0}
2 changes: 2 additions & 0 deletions Space Shooter/Assets/Prefabs/Astroid Medium.prefab
Expand Up @@ -150,3 +150,5 @@ MonoBehaviour:
playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
scoreValue: 30
health: 2
Player: {fileID: 0}
2 changes: 2 additions & 0 deletions Space Shooter/Assets/Prefabs/Astroid big.prefab
Expand Up @@ -150,3 +150,5 @@ MonoBehaviour:
playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
scoreValue: 50
health: 3
Player: {fileID: 0}
7 changes: 4 additions & 3 deletions Space Shooter/Assets/Prefabs/EnemyPlane.prefab
Expand Up @@ -165,11 +165,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9e22954f4d28c134a8c3947b377ebf89, type: 3}
m_Name:
m_EditorClassIdentifier:
explosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
explosion: {fileID: 0}
playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
scoreValue: 100
scoreValue: 50
health: 1
Player: {fileID: 0}
--- !u!114 &114722790963509320
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
290 changes: 290 additions & 0 deletions Space Shooter/Assets/Prefabs/Player.prefab
@@ -0,0 +1,290 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &414629805906031132
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 414629805906031104}
- component: {fileID: 414629805906031105}
- component: {fileID: 414629805906031107}
- component: {fileID: 414629805906031134}
- component: {fileID: 414629805906031135}
- component: {fileID: 414629805906031106}
- component: {fileID: 114043405770662276}
m_Layer: 0
m_Name: Player
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &414629805906031104
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 414629805906031132}
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:
- {fileID: 414629807406309354}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &414629805906031105
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 414629805906031132}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, 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: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: d7774e37717658542aa460a670d56026, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.54, y: 0.62}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &414629805906031107
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 414629805906031132}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ad7f4137b7a3a5f4ab8e0dbabfa58236, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 5
boundary:
xMin: -4.868
xMax: 4.868
yMin: -0.34
yMax: 4.9
Shot: {fileID: 8856353955679083582, guid: 46035d7c8d57a37498081013c50b391f, type: 3}
ShotSpawn: {fileID: 414629807406309354}
fireRate: 0.25
--- !u!50 &414629805906031134
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 414629805906031132}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!70 &414629805906031135
CapsuleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 414629805906031132}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: -0.0010465682}
m_Size: {x: 0.54, y: 0.62209314}
m_Direction: 0
--- !u!82 &414629805906031106
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 414629805906031132}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 9bc8b66baf0a5694d9f6e6e72b11e0db, type: 3}
m_PlayOnAwake: 0
m_Volume: 0.5
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!114 &114043405770662276
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 414629805906031132}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9e22954f4d28c134a8c3947b377ebf89, type: 3}
m_Name:
m_EditorClassIdentifier:
explosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
scoreValue: 0
health: 4
Player: {fileID: 414629805906031132}
--- !u!1 &414629807406309355
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 414629807406309354}
m_Layer: 0
m_Name: ShotSpawn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &414629807406309354
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 414629807406309355}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.35, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 414629805906031104}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
7 changes: 7 additions & 0 deletions Space Shooter/Assets/Prefabs/Player.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Space Shooter/Assets/Prefabs/RocketLaunch (enemy).prefab
Expand Up @@ -96,11 +96,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9e22954f4d28c134a8c3947b377ebf89, type: 3}
m_Name:
m_EditorClassIdentifier:
explosion: {fileID: 0}
explosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd,
type: 3}
scoreValue: 0
health: 0
Player: {fileID: 0}
--- !u!114 &114097449171881602
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down

0 comments on commit 4365931

Please sign in to comment.