Created unity project
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c64d264596194ba0bff9b27c7928d57
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,167 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1220112045462766
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4705424115751604}
|
||||
- component: {fileID: 33764645063084806}
|
||||
- component: {fileID: 23598453568307950}
|
||||
m_Layer: 0
|
||||
m_Name: Visual
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4705424115751604
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1220112045462766}
|
||||
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: 4183478139923782}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &33764645063084806
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1220112045462766}
|
||||
m_Mesh: {fileID: 4300002, guid: baedbbad82997f445a8cb4da210404e0, type: 3}
|
||||
--- !u!23 &23598453568307950
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1220112045462766}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 583ff7026dac91849b7c7b2468ba456b, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
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
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &1653686695687168
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4183478139923782}
|
||||
- component: {fileID: 58911922280945336}
|
||||
- component: {fileID: 50909243341912102}
|
||||
- component: {fileID: 114601615147883220}
|
||||
m_Layer: 0
|
||||
m_Name: Asteroid
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4183478139923782
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1653686695687168}
|
||||
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: 4705424115751604}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!58 &58911922280945336
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1653686695687168}
|
||||
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}
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.5
|
||||
--- !u!50 &50909243341912102
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1653686695687168}
|
||||
m_BodyType: 1
|
||||
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: 1
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 1
|
||||
m_Constraints: 0
|
||||
--- !u!114 &114601615147883220
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1653686695687168}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2ffc52749732c4937a322d64623addf3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
asteroidExplosion: {fileID: 100004, guid: a6d58f54ce5934781962a4f887e834f3, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ef8c70ee398040cd96c9c6b046d7ee0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,76 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1859710063229298
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4366364659058516}
|
||||
- component: {fileID: 20377649588474206}
|
||||
m_Layer: 0
|
||||
m_Name: Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4366364659058516
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1859710063229298}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!20 &20377649588474206
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1859710063229298}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a06aa0896835ab4d92672582ee1742e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cfd2cdd25852594b8c9f1c5528e8e87
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6d58f54ce5934781962a4f887e834f3
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23fbf2b41e7a11b468af47b5b9fe6edc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1560558224493566}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1560558224493566
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4315250768066480}
|
||||
- component: {fileID: 114341638294691572}
|
||||
m_Layer: 0
|
||||
m_Name: GameManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4315250768066480
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1560558224493566}
|
||||
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: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &114341638294691572
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1560558224493566}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a714a81b1536b4426b80643ee6a61629, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
spaceshipPrefab: {fileID: 1546399597766936, guid: 6168cd56cd6c54ceea9dce5cbd70458a,
|
||||
type: 2}
|
||||
asteroidPrefab: {fileID: 1653686695687168, guid: 6ef8c70ee398040cd96c9c6b046d7ee0,
|
||||
type: 2}
|
||||
asteroidCount: 0
|
||||
asteroidSpawnDelay: 1
|
||||
asteroidSpawnTimer: 0
|
||||
deaths: 0
|
||||
mobileInputCanvas: {fileID: 1935473650922600, guid: 073a42ed5c0e32f4caca730878a5f2b9,
|
||||
type: 2}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d08b6c4fc93b4816be92979bac02b20
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,173 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1138199845139298}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1035386964261088
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4796391903237718}
|
||||
- component: {fileID: 108192813739255852}
|
||||
m_Layer: 0
|
||||
m_Name: ColdLight
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1138199845139298
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4696753086440088}
|
||||
m_Layer: 0
|
||||
m_Name: Lighting
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1851966716751366
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4803032359773098}
|
||||
- component: {fileID: 108756170717035470}
|
||||
m_Layer: 0
|
||||
m_Name: WarmLight
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4696753086440088
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1138199845139298}
|
||||
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: 4803032359773098}
|
||||
- {fileID: 4796391903237718}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4796391903237718
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1035386964261088}
|
||||
m_LocalRotation: {x: -0.2376234, y: 0.73535436, z: 0.5491153, w: 0.31821623}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4696753086440088}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 286.5, y: -226.8, z: 0}
|
||||
--- !u!4 &4803032359773098
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1851966716751366}
|
||||
m_LocalRotation: {x: 0.40592465, y: -0.23485525, z: 0.10876717, w: 0.87649184}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4696753086440088}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 49.7, y: -30, z: 0}
|
||||
--- !u!108 &108192813739255852
|
||||
Light:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1035386964261088}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 0, g: 0.71034503, b: 1, a: 1}
|
||||
m_Intensity: 0.3
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 0
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!108 &108756170717035470
|
||||
Light:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1851966716751366}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.3103448, b: 0, a: 1}
|
||||
m_Intensity: 0.77
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 0
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94a58f57296315a43acf9cb0455c51cb
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6168cd56cd6c54ceea9dce5cbd70458a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1680df514e7e41543ad9ef4a61e49e42
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58dc4a156c6b5984987f3394fd558d37
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1182636d049cdd41be478e824a3be06
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,179 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1260654842730644
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4762832958201390}
|
||||
- component: {fileID: 61714626582628662}
|
||||
- component: {fileID: 50249730776775846}
|
||||
- component: {fileID: 114708358174716088}
|
||||
m_Layer: 0
|
||||
m_Name: Laser
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4762832958201390
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1260654842730644}
|
||||
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: 4618405364176704}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &61714626582628662
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1260654842730644}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0.25}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 0.083333336, y: 0.083333336}
|
||||
newSize: {x: 0.2, y: 0.2}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.2, y: 0.5}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!50 &50249730776775846
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1260654842730644}
|
||||
m_BodyType: 1
|
||||
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: 1
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 1
|
||||
m_Constraints: 0
|
||||
--- !u!114 &114708358174716088
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1260654842730644}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5db3784d30964d24aa8bad3aabc8a2d0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
destroyOnCollision: 0
|
||||
isActive: 1
|
||||
duration: 0.75
|
||||
--- !u!1 &1480441331374636
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4618405364176704}
|
||||
- component: {fileID: 33346622378511068}
|
||||
- component: {fileID: 23809108965932534}
|
||||
m_Layer: 0
|
||||
m_Name: Visual
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4618405364176704
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1480441331374636}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.25, z: 0}
|
||||
m_LocalScale: {x: 1, y: 0.86, z: 0.5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4762832958201390}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &33346622378511068
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1480441331374636}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &23809108965932534
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1480441331374636}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 3220a19be9d4c6e4891e401eb38caa9e, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
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
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77573510eaf859c4695181255e2d6c2d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,177 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1258988639053648
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4276166475450550}
|
||||
- component: {fileID: 33874305319380902}
|
||||
- component: {fileID: 23378388564085086}
|
||||
m_Layer: 0
|
||||
m_Name: Visual
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4276166475450550
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1258988639053648}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4925278178489408}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &33874305319380902
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1258988639053648}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &23378388564085086
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1258988639053648}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 3220a19be9d4c6e4891e401eb38caa9e, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
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
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &1382199488278630
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4925278178489408}
|
||||
- component: {fileID: 61250418499648812}
|
||||
- component: {fileID: 50666150104879410}
|
||||
- component: {fileID: 114078910698489114}
|
||||
m_Layer: 0
|
||||
m_Name: Projectile
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4925278178489408
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1382199488278630}
|
||||
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: 4276166475450550}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &61250418499648812
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1382199488278630}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 0.083333336, y: 0.083333336}
|
||||
newSize: {x: 0.2, y: 0.2}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.2, y: 0.2}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!50 &50666150104879410
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1382199488278630}
|
||||
m_BodyType: 1
|
||||
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: 1
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 1
|
||||
m_Constraints: 0
|
||||
--- !u!114 &114078910698489114
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1382199488278630}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ab65719fb77f94941b627fdedb501f31, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
destroyOnCollision: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de5f42023184642b0b244a8e0ad56f03
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 15d37c83db3355947a8633e4162238f7, type: 3}
|
||||
m_Name: WeaponData
|
||||
m_EditorClassIdentifier:
|
||||
weapons:
|
||||
- weaponName: Basic
|
||||
weaponPrefab: {fileID: 1382199488278630, guid: de5f42023184642b0b244a8e0ad56f03, type: 3}
|
||||
- weaponName: Laser
|
||||
weaponPrefab: {fileID: 1260654842730644, guid: 77573510eaf859c4695181255e2d6c2d, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd21e76343fd12145b604e732bdf3810
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9c418a8e883b1246a9d4a98cfeab4b7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,55 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1019787296165444
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4893403959414016}
|
||||
- component: {fileID: 114472804864517158}
|
||||
m_Layer: 0
|
||||
m_Name: TestsReferences
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4893403959414016
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1019787296165444}
|
||||
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: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &114472804864517158
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1019787296165444}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 442ac454dde377b499a5106b58789677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
asteroidsScene: {fileID: 102900000, guid: 99c9720ab356a0642a771bea13969a05, type: 3}
|
||||
spaceshipPrefab: {fileID: 1546399597766936, guid: 6168cd56cd6c54ceea9dce5cbd70458a, type: 3}
|
||||
cameraPrefab: {fileID: 1859710063229298, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
asteroidPrefab: {fileID: 1653686695687168, guid: 6ef8c70ee398040cd96c9c6b046d7ee0, type: 3}
|
||||
gameManagerPrefab: {fileID: 1560558224493566, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
projectilePrefab: {fileID: 1382199488278630, guid: de5f42023184642b0b244a8e0ad56f03, type: 3}
|
||||
laserPrefab: {fileID: 1260654842730644, guid: 77573510eaf859c4695181255e2d6c2d, type: 3}
|
||||
inGameMenuPrefab: {fileID: 1458198147551692, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
spaceshipDebrisPrefab: {fileID: 1715439837662698, guid: 23fbf2b41e7a11b468af47b5b9fe6edc, type: 3}
|
||||
explosionPrefab: {fileID: 100004, guid: a6d58f54ce5934781962a4f887e834f3, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b1bf207adfbf5643bd9daafdc4792f7
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f704ae4b4f98ae41a0bce26658850c1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,654 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 1.4239352, g: 1.5, b: 0.9485295, a: 1}
|
||||
m_AmbientEquatorColor: {r: 1, g: 0.8308824, b: 0.8308824, a: 1}
|
||||
m_AmbientGroundColor: {r: 1.2044117, g: 1.1801472, b: 1.5, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 1
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 10
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 256
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 1333992059}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &479409701
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1035386964261088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1851966716751366, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4696753086440088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4696753086440088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4696753086440088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4696753086440088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4696753086440088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4696753086440088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4696753086440088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4696753086440088, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 108192813739255852, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_Intensity
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 108756170717035470, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
propertyPath: m_Intensity
|
||||
value: 0.6
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 94a58f57296315a43acf9cb0455c51cb, type: 3}
|
||||
--- !u!1001 &838114435
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4366364659058516, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4366364659058516, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4366364659058516, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4366364659058516, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4366364659058516, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4366364659058516, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4366364659058516, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4366364659058516, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 20377649588474206, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_ClearFlags
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 20377649588474206, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_BackGroundColor.r
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 20377649588474206, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_BackGroundColor.g
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 20377649588474206, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
propertyPath: m_BackGroundColor.b
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1a06aa0896835ab4d92672582ee1742e, type: 3}
|
||||
--- !u!1001 &1037302348
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4315250768066480, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4315250768066480, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4315250768066480, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4315250768066480, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4315250768066480, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4315250768066480, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4315250768066480, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4315250768066480, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1d08b6c4fc93b4816be92979bac02b20, type: 3}
|
||||
--- !u!850595691 &1333992059
|
||||
LightingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Settings.lighting
|
||||
serializedVersion: 2
|
||||
m_GIWorkflowMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_RealtimeEnvironmentLighting: 1
|
||||
m_BounceScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_UsingShadowmask: 1
|
||||
m_BakeBackend: 1
|
||||
m_LightmapMaxSize: 1024
|
||||
m_BakeResolution: 10
|
||||
m_Padding: 2
|
||||
m_TextureCompression: 1
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAO: 0
|
||||
m_MixedBakeMode: 2
|
||||
m_LightmapsBakeMode: 1
|
||||
m_FilterMode: 1
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_RealtimeResolution: 2
|
||||
m_ForceWhiteAlbedo: 0
|
||||
m_ForceUpdates: 0
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherRayCount: 256
|
||||
m_FinalGatherFiltering: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 256
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_PVRBounces: 2
|
||||
m_PVRRussianRouletteStartBounce: 2
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
--- !u!1001 &1354673069
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1113499502402590, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1173420939086550, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1934168555171880, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114697676484000544, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_Color.r
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114697676484000544, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_Color.g
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114697676484000544, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_Color.b
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224004167847328056, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224004167847328056, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224004167847328056, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 470.25
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224004167847328056, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -160
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224080333828678188, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224080333828678188, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224080333828678188, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224080333828678188, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224102344202964502, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224102344202964502, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224102344202964502, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 470.25
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224102344202964502, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -410
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224192680270864624, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224192680270864624, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224192680270864624, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224192680270864624, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224196067101167210, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224196067101167210, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224196067101167210, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224196067101167210, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224207955033908946, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224278096779884986, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224278096779884986, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224278096779884986, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224278096779884986, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224331889350544396, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224331889350544396, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224331889350544396, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224331889350544396, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224466862422967478, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224466862422967478, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224466862422967478, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224466862422967478, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224537579283149488, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224537579283149488, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224537579283149488, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224537579283149488, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224602281206798814, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224602281206798814, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224602281206798814, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224602281206798814, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224701616038502490, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224701616038502490, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224701616038502490, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224701616038502490, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224924819232728110, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224924819232728110, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224924819232728110, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224924819232728110, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224941624602128828, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224941624602128828, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224941624602128828, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224941624602128828, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 58dc4a156c6b5984987f3394fd558d37, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99c9720ab356a0642a771bea13969a05
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85f76a965e80c47e59bc69dad4b1fc16
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 304890e1473c6f043bddd6aedf753ed1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class AnimatorDisabler : StateMachineBehaviour
|
||||
{
|
||||
// OnStateExit is called when a transition ends and the state machine finishes evaluating this state
|
||||
override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
|
||||
{
|
||||
if (stateInfo.normalizedTime >= 1.0f)
|
||||
animator.enabled = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7d5bbcfccd21a24a95cf046c5166dc3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "Unity.TestTools.CodeCoverage.Sample.Asteroids",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3ece71e594f242f595df589ae3414f7
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad033f3644482f24383a32bddafe2e9d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,62 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class AsteroidController : MonoBehaviour
|
||||
{
|
||||
public GameObject asteroidExplosion;
|
||||
|
||||
private int splitCount = 0;
|
||||
private Vector2 direction = Vector2.right;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
transform.rotation = Random.rotation;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if(!GameManager.IsPaused)
|
||||
Move();
|
||||
}
|
||||
|
||||
public void Move()
|
||||
{
|
||||
transform.position += (Vector3) direction * Time.deltaTime / transform.localScale.x / 2.0f;
|
||||
if (Vector2.Distance(transform.position, Vector2.zero) > 20.0f)
|
||||
DestroyImmediate(gameObject);
|
||||
}
|
||||
|
||||
public void Split()
|
||||
{
|
||||
if(splitCount < 2)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
AsteroidController asteroid = Instantiate(gameObject, transform.position, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
asteroid.SetSplitCount(splitCount + 1);
|
||||
asteroid.SetDirection(new Vector2(Random.Range(-20.0f, 20.0f), Random.Range(-20.0f, 20.0f)));
|
||||
}
|
||||
GameManager.AddToScore(splitCount);
|
||||
Instantiate(asteroidExplosion, transform.position, transform.GetChild(0).rotation).transform.localScale = transform.localScale;
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
public void SetSplitCount(int value)
|
||||
{
|
||||
splitCount = value;
|
||||
transform.localScale = new Vector3(1.0f, 1.0f, 1.0f)/ (Mathf.Pow(2, splitCount));
|
||||
}
|
||||
|
||||
public int GetSplitCount()
|
||||
{
|
||||
return splitCount;
|
||||
}
|
||||
|
||||
public void SetDirection(Vector2 value)
|
||||
{
|
||||
direction = (value - (Vector2)transform.position).normalized;
|
||||
}
|
||||
|
||||
public Vector2 GetDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ffc52749732c4937a322d64623addf3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class DebrisController : MonoBehaviour
|
||||
{
|
||||
public GameObject explosionParticles;
|
||||
|
||||
public float impulse = 1.0f;
|
||||
public float debrisDuration = 0.5f;
|
||||
|
||||
private Rigidbody2D[] fragments;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (GameManager.effectsEnabled)
|
||||
{
|
||||
if (explosionParticles != null)
|
||||
{
|
||||
GameObject particles = Instantiate(explosionParticles, transform.position, Quaternion.identity);
|
||||
particles.transform.localScale = transform.localScale == Vector3.one ? transform.localScale : Vector3.one / 3.0f + transform.localScale / 2.0f;
|
||||
Destroy(particles, particles.GetComponent<ParticleSystem>().main.duration);
|
||||
}
|
||||
|
||||
fragments = GetComponentsInChildren<Rigidbody2D>();
|
||||
foreach (Rigidbody2D fragment in fragments)
|
||||
{
|
||||
fragment.AddForce((fragment.position - (Vector2)transform.position) * transform.localScale.x * impulse, ForceMode2D.Impulse);
|
||||
}
|
||||
Destroy(gameObject, debrisDuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d0340cb4fdc1a84dbc5c92daf754b55
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,143 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SpaceshipController : MonoBehaviour
|
||||
{
|
||||
public GameObject spaceshipDebris;
|
||||
public WeaponList weaponList;
|
||||
public Vector2 direction = Vector2.zero;
|
||||
|
||||
bool isColliding = false;
|
||||
|
||||
public enum Weapon
|
||||
{
|
||||
Basic,
|
||||
Laser
|
||||
}
|
||||
|
||||
public Weapon currentWeapon = Weapon.Basic;
|
||||
private GameObject weaponInstance;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!GameManager.IsPaused)
|
||||
Move();
|
||||
}
|
||||
|
||||
public void Move()
|
||||
{
|
||||
float horizontalAxis = Input.GetAxis("Horizontal");
|
||||
float verticalAxis = Input.GetAxis("Vertical");
|
||||
|
||||
if (verticalAxis > 0.0f)
|
||||
Thrust(verticalAxis);
|
||||
if (Mathf.Abs(horizontalAxis) > 0.0f)
|
||||
Turn(horizontalAxis);
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
Shoot();
|
||||
|
||||
transform.position += (Vector3)direction * Time.deltaTime * 4.0f;
|
||||
CalculatePositionOnCamera();
|
||||
}
|
||||
|
||||
public void Thrust(float power)
|
||||
{
|
||||
direction = Vector2.Lerp(direction, transform.up * power, Time.deltaTime * 4.0f);
|
||||
}
|
||||
|
||||
public void Turn(float delta)
|
||||
{
|
||||
transform.eulerAngles = new Vector3(0.0f, 0.0f, transform.eulerAngles.z - delta * 150.0f * Time.deltaTime);
|
||||
transform.GetChild(0).localEulerAngles = new Vector3(0.0f, -delta * 30.0f, 0.0f);
|
||||
}
|
||||
|
||||
public void Shoot(bool onMobile = false)
|
||||
{
|
||||
// If Weapon is Basic, the Prefabs/Weapons/Projectile prefab is instantiated
|
||||
// If Weapon is Laser, the Prefabs/Weapons/Laser prefab is instantiated
|
||||
|
||||
switch (currentWeapon)
|
||||
{
|
||||
case Weapon.Basic:
|
||||
ProjectileController projectile = Instantiate(weaponList.weapons[(int)currentWeapon].weaponPrefab, transform.position, Quaternion.identity).GetComponent<ProjectileController>();
|
||||
projectile.SetDirection(transform.up);
|
||||
break;
|
||||
case Weapon.Laser:
|
||||
if (weaponInstance != null)
|
||||
break;
|
||||
weaponInstance = Instantiate(weaponList.weapons[(int)currentWeapon].weaponPrefab, transform.position, Quaternion.identity);
|
||||
weaponInstance.transform.up = transform.up;
|
||||
weaponInstance.transform.parent = transform;
|
||||
break;
|
||||
default:
|
||||
Debug.LogError("Invalid weapon state.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
// Preventing multiple collision triggers on the same frame
|
||||
if (isColliding)
|
||||
return;
|
||||
|
||||
AsteroidController asteroidController = collision.gameObject.GetComponent<AsteroidController>();
|
||||
|
||||
if (asteroidController)
|
||||
{
|
||||
asteroidController.Split();
|
||||
if(GameManager.instance != null)
|
||||
GameManager.instance.RespawnShip();
|
||||
Instantiate(spaceshipDebris, transform.position, transform.GetChild(0).rotation);
|
||||
Destroy(gameObject);
|
||||
isColliding = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void CalculatePositionOnCamera()
|
||||
{
|
||||
if (Camera.main != null)
|
||||
{
|
||||
bool warped = false;
|
||||
|
||||
Vector2 positionOnCamera = Camera.main.WorldToViewportPoint(transform.position);
|
||||
if (positionOnCamera.x > 1.05f)
|
||||
{
|
||||
warped = true;
|
||||
transform.position = (Vector2)Camera.main.ViewportToWorldPoint(new Vector2(-0.05f, positionOnCamera.y));
|
||||
}
|
||||
else if (positionOnCamera.x < -0.05f)
|
||||
{
|
||||
warped = true;
|
||||
transform.position = (Vector2)Camera.main.ViewportToWorldPoint(new Vector2(1.05f, positionOnCamera.y));
|
||||
}
|
||||
else if (positionOnCamera.y > 1.05f)
|
||||
{
|
||||
warped = true;
|
||||
transform.position = (Vector2)Camera.main.ViewportToWorldPoint(new Vector2(positionOnCamera.x, -0.05f));
|
||||
}
|
||||
else if (positionOnCamera.y < -0.05f)
|
||||
{
|
||||
warped = true;
|
||||
transform.position = (Vector2)Camera.main.ViewportToWorldPoint(new Vector2(positionOnCamera.x, 1.05f));
|
||||
}
|
||||
|
||||
if (warped)
|
||||
{
|
||||
transform.GetChild(0).GetChild(0).GetComponent<EngineTrail>().ClearParticles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateWeapon(int score)
|
||||
{
|
||||
Weapon weapon = Weapon.Basic;
|
||||
|
||||
if (score >= 8000)
|
||||
weapon = Weapon.Laser;
|
||||
|
||||
if (weapon == currentWeapon)
|
||||
return;
|
||||
|
||||
currentWeapon = weapon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5aeff83e8c0bc4fb2b3d12ab3b2d49a8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 400
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 867fb24d4d60d5141b99b22a52954c62
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class EngineTrail : MonoBehaviour
|
||||
{
|
||||
ParticleSystem ps;
|
||||
ParticleSystem.EmissionModule em;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (!GameManager.effectsEnabled)
|
||||
gameObject.SetActive(false);
|
||||
|
||||
ps = GetComponent<ParticleSystem>();
|
||||
em = ps.emission;
|
||||
em.enabled = true;
|
||||
}
|
||||
|
||||
public void ClearParticles()
|
||||
{
|
||||
StartCoroutine(Clear());
|
||||
}
|
||||
|
||||
IEnumerator Clear()
|
||||
{
|
||||
em.enabled = false;
|
||||
ps.Clear();
|
||||
yield return null;
|
||||
em.enabled = true;
|
||||
ps.Clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2c27cb7e7d02014eab1dc6e617dbc18
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 102f521d3fefd5a46b63e4713e96cdfa
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,161 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
// Values and methods for testing
|
||||
public static bool effectsEnabled = true;
|
||||
public static bool startEnabled = true;
|
||||
public static bool updateEnabled = true;
|
||||
public static bool asteroidsEnabled = true;
|
||||
|
||||
public static void InitializeTestingEnvironment(bool start, bool update, bool effects, bool asteroids, bool paused)
|
||||
{
|
||||
effectsEnabled = effects;
|
||||
startEnabled = start;
|
||||
updateEnabled = update;
|
||||
asteroidsEnabled = asteroids;
|
||||
IsPaused = paused;
|
||||
}
|
||||
|
||||
public static GameManager instance;
|
||||
public static SpaceshipController spaceship;
|
||||
public static int score;
|
||||
public static int scoreSinceLastDeath;
|
||||
private static bool isPaused;
|
||||
|
||||
public GameObject spaceshipPrefab;
|
||||
public GameObject asteroidPrefab;
|
||||
|
||||
[HideInInspector]
|
||||
public float asteroidSpawnDelay = 1.0f;
|
||||
[HideInInspector]
|
||||
public float asteroidSpawnTimer = 0.0f;
|
||||
[HideInInspector]
|
||||
public int deaths = 0;
|
||||
|
||||
public const float SPACESHIP_RESPAWN_DELAY = 1.0f;
|
||||
public const float RELOAD_SCENE_DELAY = 3.0f;
|
||||
|
||||
public static bool IsPaused
|
||||
{
|
||||
get { return isPaused; }
|
||||
set { Time.timeScale = value ? 0.0f : 1.0f; isPaused = value; }
|
||||
}
|
||||
|
||||
public static bool SpaceshipIsActive() { return spaceship != null; }
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (instance == null)
|
||||
instance = this;
|
||||
else if (instance != this)
|
||||
Destroy(gameObject);
|
||||
|
||||
Time.timeScale = 1.0f;
|
||||
IsPaused = false;
|
||||
score = 0;
|
||||
scoreSinceLastDeath = 0;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (startEnabled)
|
||||
{
|
||||
spaceship = Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity).GetComponent<SpaceshipController>();
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (updateEnabled && !IsPaused)
|
||||
{
|
||||
UpdateTimers();
|
||||
if (asteroidSpawnTimer <= 0.0f && asteroidsEnabled)
|
||||
SpawnAsteroids();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTimers()
|
||||
{
|
||||
if (asteroidSpawnTimer > 0.0f)
|
||||
asteroidSpawnTimer -= Time.deltaTime;
|
||||
}
|
||||
|
||||
public void RespawnShip(float delay = SPACESHIP_RESPAWN_DELAY)
|
||||
{
|
||||
StartCoroutine(RespawnShipCoroutine(delay));
|
||||
}
|
||||
|
||||
public IEnumerator RespawnShipCoroutine(float delay)
|
||||
{
|
||||
deaths++;
|
||||
if (LifeCounter.instance)
|
||||
LifeCounter.instance.SetLives(3 - deaths);
|
||||
yield return new WaitForSeconds(delay);
|
||||
|
||||
if (deaths < 3)
|
||||
{
|
||||
spaceship = Instantiate(spaceshipPrefab, Vector2.zero, Quaternion.identity).GetComponent<SpaceshipController>();
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(ReloadScene());
|
||||
}
|
||||
}
|
||||
|
||||
public void SpawnAsteroids()
|
||||
{
|
||||
AsteroidController asteroid;
|
||||
if (Camera.main != null)
|
||||
{
|
||||
Vector2 spawnPosition = Random.value > 0.5f ? Camera.main.ViewportToWorldPoint(new Vector2(Random.value > 0.5f ? Random.Range(-0.1f, -0.05f) : Random.Range(1.05f, 1.1f), Random.Range(-0.1f, 1.1f))) : Camera.main.ViewportToWorldPoint(new Vector2(Random.Range(-0.1f, 1.1f), Random.value > 0.5f ? Random.Range(-0.1f, -0.05f) : Random.Range(1.05f, 1.1f)));
|
||||
asteroid = Instantiate(asteroidPrefab, spawnPosition, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
asteroid.SetDirection(Camera.main.ViewportToWorldPoint(new Vector2(Random.value, Random.value)));
|
||||
}
|
||||
else
|
||||
asteroid = Instantiate(asteroidPrefab, Vector2.zero, Quaternion.identity).GetComponent<AsteroidController>(); //for test purposes
|
||||
|
||||
float randomValue = Random.value;
|
||||
if (randomValue < 0.333f)
|
||||
asteroid.SetSplitCount(0); // big asteroid
|
||||
else if (randomValue > 0.666f)
|
||||
asteroid.SetSplitCount(1); // medium asteroid
|
||||
else
|
||||
asteroid.SetSplitCount(2); // small asteroid
|
||||
|
||||
asteroidSpawnTimer = asteroidSpawnDelay;
|
||||
}
|
||||
|
||||
IEnumerator ReloadScene()
|
||||
{
|
||||
yield return new WaitForSeconds(RELOAD_SCENE_DELAY);
|
||||
Scene scene = SceneManager.GetActiveScene();
|
||||
SceneManager.LoadScene(scene.name);
|
||||
}
|
||||
|
||||
public static void AddToScore(int splitCount)
|
||||
{
|
||||
switch (splitCount)
|
||||
{
|
||||
case 0:
|
||||
score += 1000;
|
||||
scoreSinceLastDeath += 1000;
|
||||
break;
|
||||
case 1:
|
||||
score += 500;
|
||||
scoreSinceLastDeath += 500;
|
||||
break;
|
||||
case 2:
|
||||
score += 250;
|
||||
scoreSinceLastDeath += 250;
|
||||
break;
|
||||
}
|
||||
|
||||
if (SpaceshipIsActive())
|
||||
spaceship.UpdateWeapon(scoreSinceLastDeath);
|
||||
if(ScoreCounter.instance)
|
||||
ScoreCounter.instance.StartCounting(score);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a714a81b1536b4426b80643ee6a61629
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8791fb1d8e87e63498d7d560b34eada0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class InGameMenuController : MonoBehaviour
|
||||
{
|
||||
private GameObject pauseMenu;
|
||||
private bool pauseMenuActive = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
pauseMenu = transform.GetChild(0).gameObject;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetButtonDown("Cancel"))
|
||||
ChangeMenuState(!pauseMenuActive);
|
||||
}
|
||||
|
||||
public void ChangeMenuState(bool isPaused)
|
||||
{
|
||||
if (pauseMenuActive == isPaused)
|
||||
return;
|
||||
|
||||
pauseMenu.SetActive(isPaused);
|
||||
|
||||
pauseMenuActive = isPaused;
|
||||
GameManager.IsPaused = isPaused;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf32140837e8cc14388b9522d4d48282
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 200
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class LifeCounter : MonoBehaviour
|
||||
{
|
||||
public static LifeCounter instance;
|
||||
|
||||
int previousLifeCount = 3;
|
||||
|
||||
Animator[] lives;
|
||||
|
||||
public Sprite lifeVisual;
|
||||
public Sprite emptyLifeVisual;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (instance == null)
|
||||
instance = this;
|
||||
else if (instance != this)
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
lives = transform.GetComponentsInChildren<Animator>();
|
||||
}
|
||||
|
||||
public void SetLives(int currentLives)
|
||||
{
|
||||
if (currentLives > 3)
|
||||
currentLives = 3;
|
||||
|
||||
if(currentLives <= previousLifeCount)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= currentLives)
|
||||
{
|
||||
if (i < previousLifeCount)
|
||||
{
|
||||
lives[i].enabled = true;
|
||||
lives[i].SetTrigger("Remove");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i <= currentLives)
|
||||
{
|
||||
if (i >= previousLifeCount)
|
||||
{
|
||||
lives[i].enabled = true;
|
||||
lives[i].SetTrigger("Recover");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
previousLifeCount = currentLives;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c00135462c6948043888456656db5a54
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ScoreCounter : MonoBehaviour {
|
||||
public static ScoreCounter instance;
|
||||
int currentScore = 0;
|
||||
int targetScore = 0;
|
||||
Text[] numbers;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (instance == null)
|
||||
instance = this;
|
||||
else if (instance != this)
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
numbers = transform.GetComponentsInChildren<Text>();
|
||||
}
|
||||
|
||||
Coroutine iterator;
|
||||
|
||||
public void StartCounting(int score)
|
||||
{
|
||||
targetScore = score;
|
||||
|
||||
if (iterator != null)
|
||||
StopCoroutine(iterator);
|
||||
iterator = StartCoroutine(IterateScore());
|
||||
}
|
||||
|
||||
public IEnumerator IterateScore () {
|
||||
while(currentScore < targetScore * 0.9f)
|
||||
{
|
||||
currentScore = (int)Mathf.Lerp(currentScore, targetScore, Time.deltaTime * 10.0f);
|
||||
SetScore(currentScore);
|
||||
yield return null;
|
||||
}
|
||||
SetScore(targetScore);
|
||||
StartCoroutine(Pop(targetScore.ToString().Length));
|
||||
}
|
||||
|
||||
public void SetScore(int score)
|
||||
{
|
||||
char[] charScore = score.ToString().ToCharArray();
|
||||
int scoreLength = charScore.Length;
|
||||
int k = 0;
|
||||
for(int i = 0; i < numbers.Length; i++)
|
||||
{
|
||||
if (i < numbers.Length - scoreLength)
|
||||
numbers[i].text = "0";
|
||||
else
|
||||
{
|
||||
numbers[i].text = charScore[k++].ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IEnumerator Pop(int digits)
|
||||
{
|
||||
int index = numbers.Length - digits;
|
||||
float t = 0.0f;
|
||||
while (t < 1.0f)
|
||||
{
|
||||
Vector3 scale = t < 0.2f ? Vector3.one * (1.0f + t) : Vector3.Lerp(numbers[index].transform.localScale, Vector3.one, t);
|
||||
|
||||
for (int i = index; i < numbers.Length; i++)
|
||||
numbers[i].transform.localScale = scale;
|
||||
|
||||
t += Time.deltaTime * 10.0f;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
for (int i = index; i < numbers.Length; i++)
|
||||
numbers[i].transform.localScale = Vector3.one;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1adf9b0f5de63b4faf2f253148cb20e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a868f07139a86d449a8d8f83eb76e15
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class BaseProjectile : MonoBehaviour
|
||||
{
|
||||
public bool destroyOnCollision = true;
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
AsteroidController asteroidController = collision.gameObject.GetComponent<AsteroidController>();
|
||||
|
||||
if (asteroidController)
|
||||
{
|
||||
if (collision.isActiveAndEnabled)
|
||||
asteroidController.Split();
|
||||
|
||||
if (destroyOnCollision)
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d9489cb904b7d346ac5ba24652829c2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class LaserController : BaseProjectile
|
||||
{
|
||||
public bool isActive = true;
|
||||
public float duration = 0.75f;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!GameManager.IsPaused)
|
||||
{
|
||||
if (isActive)
|
||||
Expand();
|
||||
else
|
||||
Shrink();
|
||||
|
||||
duration -= Time.deltaTime;
|
||||
if (duration <= 0.0f)
|
||||
isActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void Expand()
|
||||
{
|
||||
if (transform.localScale.y <= 25.0f)
|
||||
transform.localScale += Vector3.up * Time.deltaTime * 75.0f;
|
||||
}
|
||||
|
||||
private void Shrink()
|
||||
{
|
||||
transform.localScale -= Vector3.up * Time.deltaTime * 75.0f;
|
||||
transform.position += transform.up * Time.deltaTime * 75.0f;
|
||||
if (transform.localScale.y <= 0.0f)
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5db3784d30964d24aa8bad3aabc8a2d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class ProjectileController : BaseProjectile
|
||||
{
|
||||
private Vector2 direction = Vector2.right;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!GameManager.IsPaused)
|
||||
Move();
|
||||
}
|
||||
|
||||
public void Move()
|
||||
{
|
||||
transform.position += (Vector3)direction * Time.deltaTime * 16;
|
||||
transform.up = direction;
|
||||
if (Vector2.Distance(transform.position, Vector2.zero) > 20.0f)
|
||||
DestroyImmediate(gameObject);
|
||||
}
|
||||
|
||||
public void SetDirection(Vector2 value)
|
||||
{
|
||||
direction = value;
|
||||
}
|
||||
|
||||
public Vector2 GetDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab65719fb77f94941b627fdedb501f31
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "WeaponData", menuName = "Weapon List", order = 1)]
|
||||
public class WeaponList : ScriptableObject
|
||||
{
|
||||
[System.Serializable]
|
||||
public struct Weapon
|
||||
{
|
||||
public string weaponName;
|
||||
public GameObject weaponPrefab;
|
||||
};
|
||||
|
||||
[SerializeField]
|
||||
public List<Weapon> weapons;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15d37c83db3355947a8633e4162238f7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 889a67e57e639497d9f86cc65d35ac2f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,266 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
|
||||
public class AsteroidTests
|
||||
{
|
||||
GameObject asteroidPrefab;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
GameManager.InitializeTestingEnvironment(false, false, false, false, false);
|
||||
|
||||
asteroidPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().asteroidPrefab;
|
||||
}
|
||||
|
||||
void ClearScene()
|
||||
{
|
||||
Transform[] objects = Object.FindObjectsOfType<Transform>();
|
||||
foreach (Transform obj in objects)
|
||||
{
|
||||
if (obj != null)
|
||||
Object.DestroyImmediate(obj.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _01_AsteroidPrefabExists()
|
||||
{
|
||||
Assert.NotNull(asteroidPrefab);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _02_AsteroidPrefabCanBeInstantiated()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject asteroid = (GameObject)Object.Instantiate(asteroidPrefab);
|
||||
asteroid.name = "Asteroid";
|
||||
Assert.NotNull(GameObject.Find("Asteroid"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _03_AsteroidPrefabHasRequiredComponentTransform()
|
||||
{
|
||||
Assert.IsNotNull(asteroidPrefab.GetComponent<Transform>());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _04_AsteroidPrefabHasRequiredComponentCollider()
|
||||
{
|
||||
Assert.IsNotNull(asteroidPrefab.GetComponent<CircleCollider2D>());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _05_AsteroidPrefabHasRequiredComponentControllerScript()
|
||||
{
|
||||
Assert.IsNotNull(asteroidPrefab.GetComponent<AsteroidController>());
|
||||
Assert.IsNotNull(asteroidPrefab.GetComponent<AsteroidController>().asteroidExplosion); // Checking if script component has required references
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _06_AsteroidGameobjectIsDestroyedOnSplit()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject asteroid = (GameObject)Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
asteroid.GetComponent<AsteroidController>().Split();
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(asteroid == null, "Base asteroid was not destroyed on Split");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _07_AsteroidSplitCountCanBeChanged()
|
||||
{
|
||||
ClearScene();
|
||||
AsteroidController asteroid = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
asteroid.SetSplitCount(2);
|
||||
Assert.IsTrue(asteroid.GetSplitCount() == 2);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _08_AsteroidCanSplitIntoTwo()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject asteroid = (GameObject)Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
asteroid.GetComponent<AsteroidController>().Split(); // Split base asteroid
|
||||
|
||||
yield return null;
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>(); // Find all asteroids in the scene
|
||||
Assert.IsTrue(asteroids.Length == 2); // There should be 2 asteroids in the scene now
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _09_AsteroidCanSplitTwice()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject asteroid = (GameObject)Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
asteroid.GetComponent<AsteroidController>().Split(); // Split base asteroid
|
||||
|
||||
yield return null;
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>(); // Find all asteroids in the scene
|
||||
foreach(AsteroidController childAsteroid in asteroids)
|
||||
childAsteroid.Split(); // Split found asteroids
|
||||
|
||||
yield return null;
|
||||
|
||||
asteroids = Object.FindObjectsOfType<AsteroidController>(); // Find all asteroids in the scene
|
||||
Assert.IsTrue(asteroids.Length == 4); // There should be 4 asteroids in the scene now
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
// It takes three hits to destroy an asteroid from base size, after 3 hits the asteroid should not split anymore
|
||||
public IEnumerator _10_AsteroidCannotSplitThreeTimes()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject asteroid = (GameObject)Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
asteroid.GetComponent<AsteroidController>().Split(); // Split base asteroid
|
||||
|
||||
yield return null;
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>(); // Find all asteroids in the scene
|
||||
foreach (AsteroidController childAsteroid in asteroids)
|
||||
childAsteroid.Split(); // Split found asteroids
|
||||
|
||||
yield return null;
|
||||
|
||||
asteroids = Object.FindObjectsOfType<AsteroidController>(); // Find all asteroids in the scene
|
||||
foreach (AsteroidController childAsteroid in asteroids)
|
||||
childAsteroid.Split(); // Split found asteroids
|
||||
|
||||
yield return null;
|
||||
|
||||
asteroids = Object.FindObjectsOfType<AsteroidController>(); // Find all asteroids in the scene
|
||||
Assert.IsTrue(asteroids.Length == 0); // There should be no asteroids left in the scene
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
// Splitting the asteroid should spawn 2 asteroids at half scale of the split asteroid
|
||||
public IEnumerator _11_AsteroidScaleIsCutInHalfOnSplit()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject asteroid = (GameObject)Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
asteroid.GetComponent<AsteroidController>().Split(); // Split base asteroid
|
||||
|
||||
yield return null;
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>(); // Find all asteroids in the scene
|
||||
foreach (AsteroidController childAsteroid in asteroids)
|
||||
Assert.IsTrue(childAsteroid.transform.localScale == new Vector3(0.5f, 0.5f, 0.5f));
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void _12_AsteroidCanMove()
|
||||
{
|
||||
ClearScene();
|
||||
AsteroidController asteroid = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
asteroid.Move();
|
||||
Assert.IsTrue(asteroid.transform.position != Vector3.zero);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _13_AsteroidDirectionCanBeChanged()
|
||||
{
|
||||
ClearScene();
|
||||
AsteroidController asteroid = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
asteroid.SetDirection(Vector2.up);
|
||||
Assert.IsTrue(asteroid.GetDirection() == Vector2.up);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _14_AsteroidMovesAccordingToItsDirectionVector()
|
||||
{
|
||||
ClearScene();
|
||||
AsteroidController asteroid = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
asteroid.SetDirection(Vector2.up);
|
||||
Assert.IsTrue(asteroid.GetDirection() == Vector2.up);
|
||||
|
||||
float t = 0.5f;
|
||||
while (t > 0.0f)
|
||||
{
|
||||
t -= Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Assert.IsTrue(asteroid.transform.position.x == 0.0f && asteroid.transform.position.y > 0.0f);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _15_AsteroidIsDestroyedWhenOffscreen()
|
||||
{
|
||||
ClearScene();
|
||||
AsteroidController asteroid = Object.Instantiate(asteroidPrefab, Vector3.right * 100, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(asteroid == null, "Asteroid was not destroyed when off screen");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _16_AsteroidPrefabHasRequiredVisual()
|
||||
{
|
||||
Transform visualChild = asteroidPrefab.transform.GetChild(0);
|
||||
Assert.IsTrue(visualChild.name == "Visual");
|
||||
Assert.IsNotNull(visualChild);
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshRenderer>());
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshRenderer>().sharedMaterials[0]);
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshFilter>());
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshFilter>().sharedMesh);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _17_AsteroidPrefabHasRequiredComponentRigidbody()
|
||||
{
|
||||
Assert.IsNotNull(asteroidPrefab.GetComponent<Rigidbody2D>());
|
||||
Assert.IsTrue(asteroidPrefab.GetComponent<Rigidbody2D>().isKinematic);
|
||||
Assert.IsTrue(asteroidPrefab.GetComponent<Rigidbody2D>().collisionDetectionMode == CollisionDetectionMode2D.Continuous);
|
||||
Assert.IsTrue(asteroidPrefab.GetComponent<Rigidbody2D>().interpolation == RigidbodyInterpolation2D.Interpolate);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _18_AsteroidStartsWithARandomRotation()
|
||||
{
|
||||
ClearScene();
|
||||
AsteroidController asteroid1 = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
AsteroidController asteroid2 = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
AsteroidController asteroid3 = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(asteroid1.transform.rotation != asteroid2.transform.rotation && asteroid1.transform.rotation != asteroid3.transform.rotation && asteroid2.transform.rotation != asteroid3.transform.rotation);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _19_AsteroidSpawnsExplosionWhenDestroyed()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject asteroid = (GameObject)Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
asteroid.GetComponent<AsteroidController>().Split();
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(asteroid == null);
|
||||
GameObject explosion = GameObject.Find("ExplosionRegular(Clone)");
|
||||
Assert.NotNull(explosion);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _20_AsteroidDoesntMoveDuringPause()
|
||||
{
|
||||
ClearScene();
|
||||
AsteroidController asteroid = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
asteroid.SetDirection(Vector2.up);
|
||||
Vector3 startPosition = asteroid.transform.position;
|
||||
GameManager.IsPaused = true;
|
||||
|
||||
for(int i = 0; i < 20; i++)
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(asteroid.transform.position == startPosition);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ab6f846b4ad547d6b568e2c987b74c7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "Unity.TestTools.CodeCoverage.Sample.Asteroids.Tests",
|
||||
"references": [
|
||||
"Unity.TestTools.CodeCoverage.Sample.Asteroids",
|
||||
"UnityEngine.TestRunner",
|
||||
"UnityEditor.TestRunner"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"nunit.framework.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [
|
||||
"UNITY_INCLUDE_TESTS"
|
||||
],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d397668ee21414d44b387471611d12a8
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,64 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
#endif
|
||||
|
||||
public class CameraTests
|
||||
{
|
||||
GameObject cameraPrefab;
|
||||
LoadSceneParameters loadSceneParameters;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
string asteroidsScenePath;
|
||||
#endif
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
GameManager.InitializeTestingEnvironment(true, true, true, false, false);
|
||||
|
||||
loadSceneParameters = new LoadSceneParameters(LoadSceneMode.Single, LocalPhysicsMode.None);
|
||||
|
||||
Object asteroidsScene = ((GameObject)Resources.Load("TestsReferences")).GetComponent<TestsReferences>().asteroidsScene;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
asteroidsScenePath = AssetDatabase.GetAssetPath(asteroidsScene);
|
||||
#endif
|
||||
cameraPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().cameraPrefab;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _01_CameraPrefabExists()
|
||||
{
|
||||
Assert.NotNull(cameraPrefab);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _02_CameraPrefabHasRequiredComponents()
|
||||
{
|
||||
Assert.IsTrue(cameraPrefab.GetComponent<Camera>().clearFlags == CameraClearFlags.Skybox);
|
||||
Assert.IsTrue(cameraPrefab.GetComponent<Camera>().orthographic);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _03_CameraExistsInScene()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorSceneManager.LoadSceneInPlayMode(asteroidsScenePath, loadSceneParameters);
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(Object.FindObjectOfType<Camera>().name == "Camera");
|
||||
#else
|
||||
yield return null;
|
||||
|
||||
Assert.Pass();
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8950a0381a02c27488d31f5dba9570c7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,105 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
|
||||
public class FXTests
|
||||
{
|
||||
GameObject spaceshipPrefab;
|
||||
GameObject asteroidPrefab;
|
||||
GameObject spaceshipDebrisPrefab;
|
||||
GameObject explosionPrefab;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
GameManager.InitializeTestingEnvironment(false, false, true, false, false);
|
||||
|
||||
spaceshipPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().spaceshipPrefab;
|
||||
asteroidPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().asteroidPrefab;
|
||||
spaceshipDebrisPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().spaceshipDebrisPrefab;
|
||||
explosionPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().explosionPrefab;
|
||||
}
|
||||
|
||||
void ClearScene()
|
||||
{
|
||||
Transform[] objects = Object.FindObjectsOfType<Transform>();
|
||||
foreach (Transform obj in objects)
|
||||
{
|
||||
if (obj != null)
|
||||
Object.DestroyImmediate(obj.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _01_FXPrefabsExist()
|
||||
{
|
||||
Assert.NotNull(spaceshipDebrisPrefab);
|
||||
Assert.NotNull(spaceshipDebrisPrefab.GetComponent<DebrisController>());
|
||||
Assert.NotNull(explosionPrefab);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _02_DebrisFragmentsHaveVelocityOnStart()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject debris = Object.Instantiate(spaceshipDebrisPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return null;
|
||||
|
||||
foreach(Rigidbody2D fragment in debris.GetComponentsInChildren<Rigidbody2D>())
|
||||
{
|
||||
Assert.IsTrue(fragment.velocity != Vector2.zero);
|
||||
}
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _03_DebrisFragmentsAreDestroyedAfterSeconds()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject debris = Object.Instantiate(spaceshipDebrisPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return new WaitForSeconds(1.0f); // Debris should be destroyed after 1 sec
|
||||
|
||||
Assert.IsTrue(debris == null);
|
||||
Assert.IsTrue(Object.FindObjectsOfType<Rigidbody2D>().Length == 0);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _04_ExplosionParticlesAreSpawnedWithDebris()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject debris = Object.Instantiate(spaceshipDebrisPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return null;
|
||||
|
||||
ParticleSystem explosion = Object.FindObjectOfType<ParticleSystem>();
|
||||
Assert.IsTrue(explosion != null);
|
||||
|
||||
yield return new WaitForSeconds(explosion.main.duration);
|
||||
|
||||
Assert.IsTrue(explosion == null);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _05_ExplosionParticlesActivateChildParticlesAndSubEmmitersSuccessfully()
|
||||
{
|
||||
ClearScene();
|
||||
ParticleSystem explosion = Object.Instantiate(spaceshipDebrisPrefab.GetComponent<DebrisController>().explosionParticles, Vector3.zero, Quaternion.identity).GetComponent<ParticleSystem>();
|
||||
Assert.IsTrue(explosion != null);
|
||||
Assert.IsTrue(explosion.transform.GetChild(0).GetComponent<ParticleSystem>() != null);
|
||||
Assert.IsTrue(explosion.transform.GetChild(1).GetComponent<ParticleSystem>() != null);
|
||||
Assert.IsTrue(explosion.transform.GetChild(2).GetComponent<ParticleSystem>() != null);
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(explosion.particleCount == 50); // Main explosion PS burst emits 50 particles on the first frame
|
||||
Assert.IsTrue(explosion.transform.GetChild(0).GetComponent<ParticleSystem>().particleCount == 1); // Glow emits 1 particle on the first frame
|
||||
Assert.IsTrue(explosion.transform.GetChild(1).GetComponent<ParticleSystem>().particleCount == 2); // Shockwave emits 2 particles on the first frame
|
||||
Assert.IsTrue(explosion.subEmitters.GetSubEmitterSystem(0) != null); // Subemitter exists, indexOutOfRange if subemitter cannot be found
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
|
||||
Assert.IsTrue(explosion.subEmitters.GetSubEmitterSystem(0).particleCount > 0); // Subemitter emits particles over time
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c134ae620ad267341a2ee7b06ea72051
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,275 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
#endif
|
||||
|
||||
public class GameManagerTests
|
||||
{
|
||||
GameObject gameManagerPrefab;
|
||||
GameObject asteroidPrefab;
|
||||
GameObject cameraPrefab;
|
||||
LoadSceneParameters loadSceneParameters;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
string asteroidsScenePath;
|
||||
#endif
|
||||
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
loadSceneParameters = new LoadSceneParameters(LoadSceneMode.Single, LocalPhysicsMode.None);
|
||||
|
||||
Object asteroidsScene = ((GameObject)Resources.Load("TestsReferences")).GetComponent<TestsReferences>().asteroidsScene;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
asteroidsScenePath = AssetDatabase.GetAssetPath(asteroidsScene);
|
||||
#endif
|
||||
gameManagerPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().gameManagerPrefab;
|
||||
asteroidPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().asteroidPrefab;
|
||||
cameraPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().cameraPrefab;
|
||||
}
|
||||
|
||||
void ClearScene()
|
||||
{
|
||||
Transform[] objects = Object.FindObjectsOfType<Transform>();
|
||||
foreach (Transform obj in objects)
|
||||
{
|
||||
if (obj != null)
|
||||
Object.DestroyImmediate(obj.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _01_GameManagerPrefabExists()
|
||||
{
|
||||
Assert.NotNull(gameManagerPrefab);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _02_GameManagerPrefabHasRequiredComponentScript()
|
||||
{
|
||||
Assert.IsNotNull(gameManagerPrefab.GetComponent<GameManager>());
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _03_GameManagerExistsInScene()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorSceneManager.LoadSceneInPlayMode(asteroidsScenePath, loadSceneParameters);
|
||||
yield return null;
|
||||
|
||||
Assert.NotNull(Object.FindObjectOfType<GameManager>());
|
||||
|
||||
#else
|
||||
yield return null;
|
||||
|
||||
Assert.Pass();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _04_GameManagerCanSpawnSpaceshipOnLoad()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(gameManagerPrefab).GetComponent<GameManager>();
|
||||
GameManager.InitializeTestingEnvironment(true, false, false, false, false);
|
||||
|
||||
yield return null;
|
||||
|
||||
SpaceshipController spaceship = Object.FindObjectOfType<SpaceshipController>();
|
||||
Assert.IsTrue(spaceship != null);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _05_GameManagerRespawnsSpaceshipAfterItHasBeenDestroyed()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(gameManagerPrefab).GetComponent<GameManager>();
|
||||
GameManager.InitializeTestingEnvironment(true, false, false, false, false);
|
||||
|
||||
yield return null;
|
||||
|
||||
GameObject asteroid = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
SpaceshipController spaceship = Object.FindObjectOfType<SpaceshipController>();
|
||||
spaceship.transform.position = Vector2.right * 10;
|
||||
asteroid.transform.position = spaceship.transform.position;
|
||||
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
Assert.IsTrue(spaceship == null);
|
||||
|
||||
yield return new WaitForSeconds(GameManager.SPACESHIP_RESPAWN_DELAY);
|
||||
|
||||
spaceship = Object.FindObjectOfType<SpaceshipController>();
|
||||
Assert.IsTrue(spaceship != null);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _06_GameManagerDoesNotRespawnShipAfterThreeDeaths()
|
||||
{
|
||||
ClearScene();
|
||||
GameManager gameManager = Object.Instantiate(gameManagerPrefab).GetComponent<GameManager>();
|
||||
GameManager.InitializeTestingEnvironment(true, false, false, false, false);
|
||||
|
||||
Object.DestroyImmediate(Object.FindObjectOfType<SpaceshipController>());
|
||||
gameManager.deaths = 2;
|
||||
gameManager.RespawnShip(0.0f);
|
||||
|
||||
yield return new WaitForSeconds(GameManager.SPACESHIP_RESPAWN_DELAY);
|
||||
|
||||
SpaceshipController spaceship = Object.FindObjectOfType<SpaceshipController>();
|
||||
Assert.IsTrue(spaceship != null);
|
||||
Object.DestroyImmediate(spaceship);
|
||||
gameManager.RespawnShip(0.0f);
|
||||
|
||||
yield return new WaitForSeconds(GameManager.SPACESHIP_RESPAWN_DELAY);
|
||||
|
||||
spaceship = Object.FindObjectOfType<SpaceshipController>();
|
||||
Assert.IsTrue(spaceship == null);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _07_GameManagerSpawnsAsteroids()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(gameManagerPrefab);
|
||||
GameManager.InitializeTestingEnvironment(false, true, false, true, false);
|
||||
|
||||
yield return null;
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
Assert.IsTrue(asteroids.Length > 0);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _08_GameManagerSpawnsAsteroidsOverTime()
|
||||
{
|
||||
ClearScene();
|
||||
GameManager gameManager = Object.Instantiate(gameManagerPrefab).GetComponent<GameManager>();
|
||||
GameManager.InitializeTestingEnvironment(false, true, false, true, false);
|
||||
|
||||
yield return new WaitForSeconds(gameManager.asteroidSpawnDelay + 0.5f);
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
Assert.IsTrue(asteroids.Length > 1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _09_GameManagerOnlySpawnsAsteroidsOffscreen()
|
||||
{
|
||||
ClearScene();
|
||||
GameManager gameManager = Object.Instantiate(gameManagerPrefab).GetComponent<GameManager>();
|
||||
GameManager.InitializeTestingEnvironment(false, false, false, false, false);
|
||||
|
||||
Object.Instantiate(cameraPrefab);
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
gameManager.SpawnAsteroids();
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
|
||||
foreach (AsteroidController roid in asteroids)
|
||||
{
|
||||
Vector2 positionOnCamera = Camera.main.WorldToViewportPoint(roid.transform.position);
|
||||
|
||||
Assert.IsTrue(((positionOnCamera.x >= -0.1f && positionOnCamera.x <= 1.1f) && (positionOnCamera.y <= -0.05f || positionOnCamera.y >= 1.05f)) ||
|
||||
((positionOnCamera.x <= -0.05f || positionOnCamera.x >= 1.05f) && (positionOnCamera.y >= -0.1f && positionOnCamera.y <= 1.1f)));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _10_GameManagerSpawnsRandomSizeAsteroids()
|
||||
{
|
||||
ClearScene();
|
||||
GameManager gameManager = Object.Instantiate(gameManagerPrefab).GetComponent<GameManager>();
|
||||
GameManager.InitializeTestingEnvironment(false, false, false, false, false);
|
||||
|
||||
bool small = false;
|
||||
bool medium = false;
|
||||
bool big = false;
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
gameManager.SpawnAsteroids();
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
foreach (AsteroidController roid in asteroids)
|
||||
{
|
||||
if (roid.GetSplitCount() == 2)
|
||||
small = true;
|
||||
else if (roid.GetSplitCount() == 1)
|
||||
medium = true;
|
||||
else if (roid.GetSplitCount() == 0)
|
||||
big = true;
|
||||
if (small && medium && big)
|
||||
break;
|
||||
}
|
||||
|
||||
Assert.IsTrue(small && medium && big);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _11_GameManagerScoreIsIncreasedAfterAsteroidsAreDestroyed()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(gameManagerPrefab);
|
||||
GameManager.InitializeTestingEnvironment(false, false, false, false, false);
|
||||
|
||||
yield return null;
|
||||
|
||||
AsteroidController asteroid = Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity).GetComponent<AsteroidController>();
|
||||
int score = GameManager.score;
|
||||
asteroid.Split();
|
||||
|
||||
Assert.IsTrue(score != GameManager.score);
|
||||
Assert.IsTrue(GameManager.score == 1000);
|
||||
|
||||
yield return null;
|
||||
|
||||
score = GameManager.score;
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
|
||||
foreach(AsteroidController ast in asteroids)
|
||||
ast.Split();
|
||||
|
||||
Assert.IsTrue(score != GameManager.score);
|
||||
Assert.IsTrue(GameManager.score == 2000);
|
||||
|
||||
yield return null;
|
||||
|
||||
score = GameManager.score;
|
||||
asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
|
||||
foreach (AsteroidController ast in asteroids)
|
||||
ast.Split();
|
||||
|
||||
Assert.IsTrue(score != GameManager.score);
|
||||
Assert.IsTrue(GameManager.score == 3000);
|
||||
}
|
||||
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _12_ReachingCertainScoreChangesSpaceshipWeapons()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(gameManagerPrefab);
|
||||
GameManager.InitializeTestingEnvironment(true, false, false, false, false);
|
||||
|
||||
yield return null;
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
GameManager.AddToScore(0);
|
||||
|
||||
SpaceshipController spaceship = Object.FindObjectOfType<SpaceshipController>();
|
||||
Assert.IsTrue(spaceship != null);
|
||||
// Weapon changes to laser upon reaching 8000 points
|
||||
Assert.IsTrue(spaceship.currentWeapon == SpaceshipController.Weapon.Laser);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4264f527d5b24e81811c2bfca2f7a68
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,302 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
|
||||
public class SpaceshipTests {
|
||||
|
||||
GameObject spaceshipPrefab;
|
||||
GameObject asteroidPrefab;
|
||||
GameObject cameraPrefab;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
GameManager.InitializeTestingEnvironment(false, false, true, false, false);
|
||||
|
||||
spaceshipPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().spaceshipPrefab;
|
||||
asteroidPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().asteroidPrefab;
|
||||
cameraPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().cameraPrefab;
|
||||
}
|
||||
|
||||
void ClearScene()
|
||||
{
|
||||
Transform[] objects = Object.FindObjectsOfType<Transform>();
|
||||
foreach (Transform obj in objects)
|
||||
{
|
||||
if (obj != null)
|
||||
Object.DestroyImmediate(obj.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _01_SpaceshipPrefabExists() {
|
||||
Assert.NotNull(spaceshipPrefab);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _02_SpaceshipPrefabCanBeInstantiated()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject spaceship = (GameObject)Object.Instantiate(spaceshipPrefab);
|
||||
spaceship.name = "Spaceship";
|
||||
Assert.NotNull(GameObject.Find("Spaceship"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _03_SpaceshipPrefabHasRequiredComponentTransform()
|
||||
{
|
||||
Assert.IsNotNull(spaceshipPrefab.GetComponent<Transform>());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _04_SpaceshipPrefabHasRequiredComponentCollider()
|
||||
{
|
||||
Assert.IsNotNull(spaceshipPrefab.GetComponent<PolygonCollider2D>());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _05_SpaceshipPrefabHasRequiredComponentControllerScript()
|
||||
{
|
||||
Assert.IsNotNull(spaceshipPrefab.GetComponent<SpaceshipController>());
|
||||
// Checking if script component has required references
|
||||
Assert.IsNotNull(spaceshipPrefab.GetComponent<SpaceshipController>().spaceshipDebris);
|
||||
Assert.IsNotNull(spaceshipPrefab.GetComponent<SpaceshipController>().weaponList);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _06_SpaceshipPrefabHasRequiredVisual()
|
||||
{
|
||||
Transform visualChild = spaceshipPrefab.transform.GetChild(0);
|
||||
Assert.IsTrue(visualChild.name == "Visual");
|
||||
Assert.IsNotNull(visualChild);
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshRenderer>());
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshRenderer>().sharedMaterials[0]);
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshRenderer>().sharedMaterials[1]);
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshFilter>());
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshFilter>().sharedMesh);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _07_SpaceshipPrefabHasRequiredComponentRigidbody()
|
||||
{
|
||||
Assert.IsNotNull(spaceshipPrefab.GetComponent<Rigidbody2D>());
|
||||
Assert.IsTrue(spaceshipPrefab.GetComponent<Rigidbody2D>().isKinematic);
|
||||
Assert.IsTrue(spaceshipPrefab.GetComponent<Rigidbody2D>().collisionDetectionMode == CollisionDetectionMode2D.Continuous);
|
||||
Assert.IsTrue(spaceshipPrefab.GetComponent<Rigidbody2D>().interpolation == RigidbodyInterpolation2D.Interpolate);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _08_SpaceshipIsDestroyedOnCollisionWithAsteroid()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity);
|
||||
Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return new WaitForFixedUpdate();
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship == null);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _09_SpaceshipTriggersAsteroidSplit()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity);
|
||||
Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return new WaitForFixedUpdate();
|
||||
yield return null;
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
Assert.IsTrue(asteroids.Length > 1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _10_SpaceshipCanMove()
|
||||
{
|
||||
ClearScene();
|
||||
SpaceshipController spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity).GetComponent<SpaceshipController>();
|
||||
spaceship.direction = Vector2.up;
|
||||
spaceship.Move();
|
||||
Assert.IsTrue(spaceship.transform.position != Vector3.zero);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _11_SpaceshipRotationCanBeChanged()
|
||||
{
|
||||
ClearScene();
|
||||
SpaceshipController spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity).GetComponent<SpaceshipController>();
|
||||
spaceship.transform.eulerAngles = new Vector3(0.0f, 0.0f, 180.0f);
|
||||
|
||||
float startingRotation = spaceship.transform.eulerAngles.z;
|
||||
spaceship.Turn(1.0f); // Turn right
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship.transform.eulerAngles.z < startingRotation);
|
||||
|
||||
startingRotation = spaceship.transform.eulerAngles.z;
|
||||
spaceship.Turn(-1.0f); // Turn left
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship.transform.eulerAngles.z > startingRotation);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _12_SpaceshipMovesAccordingToItsDirectionVector()
|
||||
{
|
||||
ClearScene();
|
||||
SpaceshipController spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.Euler(0.0f, 0.0f, 0.0f)).GetComponent<SpaceshipController>();
|
||||
spaceship.Thrust(1.0f);
|
||||
spaceship.Move();
|
||||
Assert.IsTrue(spaceship.transform.position.y >= 0.0f && spaceship.transform.position.x == 0.0f);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _13_SpaceshipIsWarpedToTheOtherSideOfTheScreenAfterMovingOffscreen()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(cameraPrefab);
|
||||
SpaceshipController spaceship = Object.Instantiate(spaceshipPrefab, Vector2.right * 100.0f, Quaternion.identity).GetComponent<SpaceshipController>();
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship.transform.position.x < 0.0f);
|
||||
spaceship.transform.position = Vector2.left * 100.0f;
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship.transform.position.x > 0.0f);
|
||||
spaceship.transform.position = Vector2.up * 100.0f;
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship.transform.position.y < 0.0f);
|
||||
spaceship.transform.position = Vector2.down * 100.0f;
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship.transform.position.y > 0.0f);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _14_SpaceshipCanFireProjectiles()
|
||||
{
|
||||
ClearScene();
|
||||
SpaceshipController spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.Euler(0.0f, 0.0f, 0.0f)).GetComponent<SpaceshipController>();
|
||||
spaceship.Shoot();
|
||||
ProjectileController projectile = Object.FindObjectOfType<ProjectileController>();
|
||||
Assert.IsTrue(projectile != null);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _15_SpaceshipSpawnsDebrisWhenDestroyed()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity);
|
||||
Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return new WaitForFixedUpdate();
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship == null);
|
||||
DebrisController[] objects = Object.FindObjectsOfType<DebrisController>();
|
||||
Assert.IsTrue(objects.Length > 0);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _16_SpaceshipEngineEmitsParticles()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity);
|
||||
Assert.IsTrue(spaceship.transform.GetChild(0).GetChild(0) != null);
|
||||
Assert.IsTrue(spaceship.transform.GetChild(0).GetChild(0).GetComponent<EngineTrail>() != null);
|
||||
ParticleSystem ps = spaceship.transform.GetChild(0).GetChild(0).GetComponent<ParticleSystem>();
|
||||
Assert.IsTrue(ps != null);
|
||||
Assert.IsTrue(ps.particleCount == 0);
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(ps.particleCount > 0);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _17_SpaceshipEngineParticlesAreClearedAfterWarp()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(cameraPrefab);
|
||||
|
||||
GameObject spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity);
|
||||
ParticleSystem ps = spaceship.transform.GetChild(0).GetChild(0).GetComponent<ParticleSystem>();
|
||||
|
||||
yield return null; // Wait for particles to spawn
|
||||
|
||||
spaceship.transform.position = Vector2.left * 100.0f;
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(ps.particleCount == 0);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _18_SpaceshipDoesntMoveDuringPause()
|
||||
{
|
||||
ClearScene();
|
||||
SpaceshipController spaceship = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity).GetComponent<SpaceshipController>();
|
||||
spaceship.direction = Vector2.up;
|
||||
Vector3 startPosition = spaceship.transform.position;
|
||||
|
||||
GameManager.IsPaused = true;
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(spaceship.transform.position == startPosition);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _19_SpaceshipPrefabHasRequiredComponentAnimator()
|
||||
{
|
||||
Assert.IsNotNull(spaceshipPrefab.transform.GetChild(0).GetComponent<Animator>());
|
||||
Assert.IsNotNull(spaceshipPrefab.transform.GetChild(0).GetComponent<Animator>().runtimeAnimatorController != null);
|
||||
Assert.IsTrue(spaceshipPrefab.transform.GetChild(0).GetComponent<Animator>().runtimeAnimatorController.name == "ShipAnimator");
|
||||
Assert.IsTrue(spaceshipPrefab.transform.GetChild(0).GetComponent<Animator>().cullingMode == AnimatorCullingMode.AlwaysAnimate);
|
||||
Assert.IsTrue(spaceshipPrefab.transform.GetChild(0).GetComponent<Animator>().updateMode == AnimatorUpdateMode.Normal);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _20_SpaceshipAnimatorPlaysSpawnAnimationOnSpawn()
|
||||
{
|
||||
ClearScene();
|
||||
Animator animator = Object.Instantiate(spaceshipPrefab, Vector3.zero, Quaternion.identity).transform.GetChild(0).GetComponent<Animator>();
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsNotNull(animator);
|
||||
Assert.IsTrue(animator.GetCurrentAnimatorStateInfo(0).IsName("SpaceshipSpawn"));
|
||||
|
||||
while (animator.GetCurrentAnimatorStateInfo(0).normalizedTime <= 1.0f)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Assert.IsTrue(animator.transform.localScale == Vector3.one);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _21_SpaceshipWeaponListContainsData()
|
||||
{
|
||||
WeaponList weaponList = spaceshipPrefab.GetComponent<SpaceshipController>().weaponList;
|
||||
Assert.IsNotNull(weaponList);
|
||||
Assert.IsTrue(weaponList.weapons.Count == 2);
|
||||
|
||||
foreach(WeaponList.Weapon weapon in weaponList.weapons)
|
||||
{
|
||||
Assert.IsTrue(weapon.weaponName.Length != 0);
|
||||
Assert.IsNotNull(weapon.weaponPrefab);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c44e1f2b99a94dd4ad55e123afc4544
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class TestsReferences : MonoBehaviour
|
||||
{
|
||||
#region SCENES
|
||||
public Object asteroidsScene;
|
||||
#endregion
|
||||
|
||||
#region CORE
|
||||
public GameObject spaceshipPrefab;
|
||||
public GameObject cameraPrefab;
|
||||
public GameObject asteroidPrefab;
|
||||
public GameObject gameManagerPrefab;
|
||||
#endregion
|
||||
|
||||
#region WEAPONS
|
||||
public GameObject projectilePrefab;
|
||||
public GameObject laserPrefab;
|
||||
#endregion
|
||||
|
||||
#region UI
|
||||
public GameObject inGameMenuPrefab;
|
||||
#endregion
|
||||
|
||||
#region FX
|
||||
public GameObject spaceshipDebrisPrefab;
|
||||
public GameObject explosionPrefab;
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 442ac454dde377b499a5106b58789677
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,243 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
#endif
|
||||
|
||||
public class UserInterfaceTests
|
||||
{
|
||||
GameObject gameManagerPrefab;
|
||||
GameObject inGameMenuPrefab;
|
||||
LoadSceneParameters loadSceneParameters;
|
||||
#if UNITY_EDITOR
|
||||
string asteroidsScenePath;
|
||||
#endif
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
GameManager.InitializeTestingEnvironment(true, false, false, false, false);
|
||||
|
||||
loadSceneParameters = new LoadSceneParameters(LoadSceneMode.Single, LocalPhysicsMode.None);
|
||||
|
||||
Object asteroidsScene = ((GameObject)Resources.Load("TestsReferences")).GetComponent<TestsReferences>().asteroidsScene;
|
||||
#if UNITY_EDITOR
|
||||
asteroidsScenePath = AssetDatabase.GetAssetPath(asteroidsScene);
|
||||
#endif
|
||||
gameManagerPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().gameManagerPrefab;
|
||||
inGameMenuPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().inGameMenuPrefab;
|
||||
}
|
||||
|
||||
void ClearScene()
|
||||
{
|
||||
Transform[] objects = Object.FindObjectsOfType<RectTransform>();
|
||||
foreach (Transform obj in objects)
|
||||
{
|
||||
if (obj != null)
|
||||
Object.DestroyImmediate(obj.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _01_InGameMenuExistsInScene()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorSceneManager.LoadSceneInPlayMode(asteroidsScenePath, loadSceneParameters);
|
||||
yield return null;
|
||||
|
||||
Assert.NotNull(Object.FindObjectOfType<InGameMenuController>());
|
||||
#else
|
||||
yield return null;
|
||||
|
||||
Assert.Pass();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _02_InGameMenuHasCorrectUIElements()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject inGameMenu = Object.Instantiate(inGameMenuPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.NotNull(inGameMenu);
|
||||
Canvas canvas = inGameMenu.GetComponent<Canvas>();
|
||||
Assert.NotNull(canvas);
|
||||
Assert.NotNull(canvas.GetComponent<InGameMenuController>());
|
||||
|
||||
Assert.NotNull(canvas.transform.GetChild(0));
|
||||
Assert.IsFalse(canvas.transform.GetChild(0).gameObject.activeInHierarchy);
|
||||
Assert.NotNull(canvas.transform.GetChild(1));
|
||||
Assert.IsTrue(canvas.transform.GetChild(1).gameObject.activeInHierarchy);
|
||||
Assert.NotNull(canvas.transform.GetChild(2));
|
||||
Assert.IsTrue(canvas.transform.GetChild(2).gameObject.activeInHierarchy);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _03_InGameMenuContainsButtons()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject inGameMenu = Object.Instantiate(inGameMenuPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return null;
|
||||
|
||||
Transform container = inGameMenu.transform.GetChild(0);
|
||||
Assert.NotNull(container.GetComponent<VerticalLayoutGroup>());
|
||||
|
||||
// InGameMenu has the game title
|
||||
Assert.NotNull(container.GetChild(1).GetComponent<Image>());
|
||||
Assert.IsTrue(container.GetChild(1).GetComponent<Image>().sprite != null);
|
||||
|
||||
// Pause menu has a resume button
|
||||
Assert.NotNull(container.GetChild(1).GetComponent<Button>());
|
||||
Assert.IsTrue(container.GetChild(1).name == "ResumeButton");
|
||||
Assert.IsTrue(container.GetChild(1).GetComponent<Button>().onClick.GetPersistentMethodName(0) == "ChangeMenuState");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _04_PauseMenuCanBeEnabledAndDisabled()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject inGameMenu = Object.Instantiate(inGameMenuPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return null;
|
||||
|
||||
InGameMenuController menuController = inGameMenu.GetComponent<InGameMenuController>();
|
||||
Assert.IsTrue(menuController.transform.GetChild(0).name == "PauseMenu");
|
||||
|
||||
menuController.ChangeMenuState(true);
|
||||
Assert.IsTrue(menuController.transform.GetChild(0).gameObject.activeInHierarchy);
|
||||
Assert.IsTrue(menuController.transform.GetChild(1).gameObject.activeInHierarchy);
|
||||
menuController.ChangeMenuState(false);
|
||||
Assert.IsFalse(menuController.transform.GetChild(0).gameObject.activeInHierarchy);
|
||||
Assert.IsTrue(menuController.transform.GetChild(1).gameObject.activeInHierarchy);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _05_PauseMenuChangesGameManagerGameState()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorSceneManager.LoadSceneInPlayMode(asteroidsScenePath, loadSceneParameters);
|
||||
yield return null;
|
||||
|
||||
InGameMenuController menuController = GameObject.Find("InGameMenu").GetComponent<InGameMenuController>();
|
||||
menuController.ChangeMenuState(true);
|
||||
Assert.IsTrue(GameManager.IsPaused);
|
||||
Assert.IsTrue(Time.timeScale == 0.0f);
|
||||
menuController.ChangeMenuState(false);
|
||||
Assert.IsFalse(GameManager.IsPaused);
|
||||
Assert.IsTrue(Time.timeScale == 1.0f);
|
||||
#else
|
||||
yield return null;
|
||||
|
||||
Assert.Pass();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _06_InGameScoreCounterChangesWhenScoreChanges()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorSceneManager.LoadSceneInPlayMode(asteroidsScenePath, loadSceneParameters);
|
||||
yield return null;
|
||||
|
||||
Assert.NotNull(GameObject.Find("InGameMenu"));
|
||||
Canvas canvas = GameObject.Find("InGameMenu").GetComponent<Canvas>();
|
||||
|
||||
Assert.NotNull(canvas.transform.GetChild(1));
|
||||
Text[] numbers = canvas.transform.GetChild(1).GetComponentsInChildren<Text>();
|
||||
Assert.IsTrue(numbers.Length == 7);
|
||||
GameManager.AddToScore(0);
|
||||
|
||||
yield return new WaitUntil(() => numbers[3].text == "1");
|
||||
|
||||
Assert.IsTrue(numbers[0].text == "0" && numbers[1].text == "0" && numbers[2].text == "0" && numbers[3].text == "1" && numbers[4].text == "0" && numbers[5].text == "0" && numbers[6].text == "0");
|
||||
#else
|
||||
yield return null;
|
||||
|
||||
Assert.Pass();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _07_InGameMenuLivesControllerPlaysAnimationsWhenLifeCountIsChanged()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject inGameMenu = Object.Instantiate(inGameMenuPrefab, Vector3.zero, Quaternion.identity);
|
||||
Transform livesTransform = inGameMenu.transform.GetChild(2);
|
||||
Animator[] lives = livesTransform.GetComponentsInChildren<Animator>();
|
||||
Assert.IsTrue(lives.Length == 3);
|
||||
|
||||
yield return null;
|
||||
|
||||
livesTransform.GetComponent<LifeCounter>().SetLives(2);
|
||||
|
||||
yield return null;
|
||||
|
||||
int i;
|
||||
|
||||
// Going from 3 to 2 lives, therefore 1 "remove" animation should play
|
||||
for (i = 0; i < lives.Length; i++)
|
||||
{
|
||||
if (i >= 2)
|
||||
{
|
||||
Assert.IsTrue(lives[i].enabled == true);
|
||||
Assert.IsTrue(lives[i].GetCurrentAnimatorStateInfo(0).IsName("RemoveLife"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.IsTrue(lives[i].enabled == false);
|
||||
}
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
for (i = 0; i < lives.Length; i++)
|
||||
Assert.IsTrue(lives[i].enabled == false);
|
||||
|
||||
livesTransform.GetComponent<LifeCounter>().SetLives(0);
|
||||
|
||||
yield return null;
|
||||
|
||||
// Going from 2 to 0 lives, therefore 2 "remove" animations should play
|
||||
for (i = 0; i < lives.Length; i++)
|
||||
{
|
||||
if (i < 2)
|
||||
{
|
||||
Assert.IsTrue(lives[i].enabled == true);
|
||||
Assert.IsTrue(lives[i].GetCurrentAnimatorStateInfo(0).IsName("RemoveLife"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.IsTrue(lives[i].enabled == false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
for (i = 0; i < lives.Length; i++)
|
||||
Assert.IsTrue(lives[i].enabled == false);
|
||||
|
||||
livesTransform.GetComponent<LifeCounter>().SetLives(3);
|
||||
|
||||
yield return null;
|
||||
|
||||
// Going from 0 to 3 lives, therefore 3 "recover" animations should play
|
||||
for (i = 0; i < lives.Length; i++)
|
||||
{
|
||||
Assert.IsTrue(lives[i].enabled == true);
|
||||
Assert.IsTrue(lives[i].GetCurrentAnimatorStateInfo(0).IsName("RecoverLife"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02f764eff5fa8bd4b802f392c705b9a9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,238 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using UnityEditor;
|
||||
|
||||
public class WeaponTests
|
||||
{
|
||||
GameObject projectilePrefab;
|
||||
GameObject laserPrefab;
|
||||
GameObject asteroidPrefab;
|
||||
GameObject spaceshipPrefab;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
GameManager.InitializeTestingEnvironment(false, false, false, false, false);
|
||||
|
||||
spaceshipPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().spaceshipPrefab;
|
||||
asteroidPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().asteroidPrefab;
|
||||
projectilePrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().projectilePrefab;
|
||||
laserPrefab = ((GameObject)Resources.Load("TestsReferences", typeof(GameObject))).GetComponent<TestsReferences>().laserPrefab;
|
||||
}
|
||||
|
||||
void ClearScene()
|
||||
{
|
||||
Transform[] objects = Object.FindObjectsOfType<Transform>();
|
||||
foreach (Transform obj in objects)
|
||||
{
|
||||
if(obj != null)
|
||||
Object.DestroyImmediate(obj.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// Uncomment the code from line 35 up to line 237, run the tests again and compare the code coverage results
|
||||
|
||||
[Test]
|
||||
public void _01_ProjectilePrefabExists()
|
||||
{
|
||||
Assert.NotNull(projectilePrefab);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _02_ProjectilePrefabCanBeInstantiated()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject projectile = (GameObject)Object.Instantiate(projectilePrefab);
|
||||
projectile.name = "Projectile";
|
||||
Assert.NotNull(GameObject.Find("Projectile"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _03_ProjectilePrefabHasRequiredComponentTransform()
|
||||
{
|
||||
Assert.IsNotNull(projectilePrefab.GetComponent<Transform>());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _04_ProjectilePrefabHasRequiredComponentCollider()
|
||||
{
|
||||
Assert.IsNotNull(projectilePrefab.GetComponent<BoxCollider2D>());
|
||||
Assert.IsTrue(projectilePrefab.GetComponent<BoxCollider2D>().size == new Vector2(0.2f, 0.2f));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _05_ProjectilePrefabHasRequiredComponentControllerScript()
|
||||
{
|
||||
Assert.IsNotNull(projectilePrefab.GetComponent<ProjectileController>());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _06_ProjectilePrefabHasRequiredVisual()
|
||||
{
|
||||
Transform visualChild = projectilePrefab.transform.GetChild(0);
|
||||
Assert.IsTrue(visualChild.name == "Visual");
|
||||
Assert.IsNotNull(visualChild);
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshRenderer>());
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshRenderer>().sharedMaterials[0]);
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshFilter>());
|
||||
Assert.IsNotNull(visualChild.GetComponent<MeshFilter>().sharedMesh);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _07_ProjectileCanMove()
|
||||
{
|
||||
ClearScene();
|
||||
ProjectileController projectile = Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity).GetComponent<ProjectileController>();
|
||||
projectile.Move();
|
||||
Assert.IsTrue(projectile.transform.position != Vector3.zero);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _08_ProjectileDirectionCanBeChanged()
|
||||
{
|
||||
ClearScene();
|
||||
ProjectileController projectile = Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity).GetComponent<ProjectileController>();
|
||||
projectile.SetDirection(Vector2.up);
|
||||
Assert.IsTrue(projectile.GetDirection() == Vector2.up);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _09_ProjectileMovesAccordingToItsDirectionVector()
|
||||
{
|
||||
ClearScene();
|
||||
ProjectileController projectile = Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity).GetComponent<ProjectileController>();
|
||||
projectile.SetDirection(Vector2.up);
|
||||
Assert.IsTrue(projectile.GetDirection() == Vector2.up);
|
||||
|
||||
float t = 0.5f;
|
||||
while (t > 0.0f)
|
||||
{
|
||||
t -= Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Assert.IsTrue(projectile.transform.position.x == 0.0f && projectile.transform.position.y > 0.0f); //check if projectile moves according to given trajectory along the Y axis
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _10_ProjectileRotatesAccordingToItsDirectionVector()
|
||||
{
|
||||
ClearScene();
|
||||
ProjectileController projectile = Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity).GetComponent<ProjectileController>();
|
||||
projectile.SetDirection(new Vector2(0.714f, -0.156f).normalized);
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue((Vector2)projectile.transform.up == projectile.GetDirection());
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _11_ProjectileIsDestroyedWhenOffsceen()
|
||||
{
|
||||
ClearScene();
|
||||
ProjectileController projectile = Object.Instantiate(projectilePrefab, Vector3.right * 100, Quaternion.identity).GetComponent<ProjectileController>();
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(projectile == null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void _12_ProjectilePrefabHasRequiredComponentRigidbody()
|
||||
{
|
||||
Assert.IsNotNull(projectilePrefab.GetComponent<Rigidbody2D>());
|
||||
Assert.IsTrue(projectilePrefab.GetComponent<Rigidbody2D>().isKinematic);
|
||||
Assert.IsTrue(projectilePrefab.GetComponent<Rigidbody2D>().collisionDetectionMode == CollisionDetectionMode2D.Continuous);
|
||||
Assert.IsTrue(projectilePrefab.GetComponent<Rigidbody2D>().interpolation == RigidbodyInterpolation2D.Interpolate);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _13_ProjectileIsDestroyedOnCollisionWithAsteroid()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject projectile = Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity);
|
||||
Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return new WaitForFixedUpdate();
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(projectile == null);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _14_ProjectileIgnoresCollisionWithSpaceship()
|
||||
{
|
||||
ClearScene();
|
||||
GameObject projectile = Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity);
|
||||
Object.Instantiate(spaceshipPrefab, Vector2.zero, Quaternion.identity);
|
||||
|
||||
yield return new WaitForFixedUpdate();
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(projectile != null);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _15_ProjectileTriggersAsteroidSplit()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity);
|
||||
Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return new WaitForFixedUpdate();
|
||||
yield return null;
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
Assert.IsTrue(asteroids.Length > 1);
|
||||
}
|
||||
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _16_ProjectilesCannotSplitTheSameAsteroidTwice()
|
||||
{
|
||||
ClearScene();
|
||||
Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity);
|
||||
Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity);
|
||||
Object.Instantiate(asteroidPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
yield return new WaitForFixedUpdate();
|
||||
yield return null;
|
||||
|
||||
AsteroidController[] asteroids = Object.FindObjectsOfType<AsteroidController>();
|
||||
Assert.IsTrue(asteroids.Length == 2);
|
||||
}
|
||||
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _17_ProjectilesDontMoveDuringPause()
|
||||
{
|
||||
ClearScene();
|
||||
ProjectileController projectile = Object.Instantiate(projectilePrefab, Vector3.zero, Quaternion.identity).GetComponent<ProjectileController>();
|
||||
projectile.SetDirection(Vector2.up);
|
||||
Vector3 startPosition = projectile.transform.position;
|
||||
GameManager.IsPaused = true;
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
yield return null;
|
||||
|
||||
Assert.IsTrue(projectile.transform.position == startPosition);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator _18_LaserFiresSuccessfully()
|
||||
{
|
||||
// ClearScene();
|
||||
// SpaceshipController spaceship = Object.Instantiate(spaceshipPrefab).GetComponent<SpaceshipController>();
|
||||
// spaceship.currentWeapon = SpaceshipController.Weapon.Laser;
|
||||
// spaceship.Shoot();
|
||||
|
||||
yield return null;
|
||||
|
||||
// LaserController laser = Object.FindObjectOfType<LaserController>();
|
||||
// Assert.NotNull(laser);
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a84ac4720880c4da591130ed39f030d9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1a6b6c94d59db447a960ba5bf424836
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d02460aeb39cbf84fa7439622b08880e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57070143857963247969fd09c8df22c8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ShipAnimator
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 1107993230705172246}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &1102516670341156370
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: SpaceshipSpawn
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: d5fd4266a1fc3134293e378a72315d2a, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &1107993230705172246
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102516670341156370}
|
||||
m_Position: {x: 312, y: 120, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 1102516670341156370}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea96ee9d8861b6c4a8a3516adad4fc71
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,313 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ShipSpawn
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 0.13333334
|
||||
value: {x: 1.5, y: 1.5, z: 1.5}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 0.28333333
|
||||
value: {x: 0.9, y: 0.9, z: 0.9}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 0.38333333
|
||||
value: {x: 1, y: 1, z: 1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 0.41666666
|
||||
value: {x: 0.9, y: 0.9, z: 0.9}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 0.45
|
||||
value: {x: 1, y: 1, z: 1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path:
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 3
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.45
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.13333334
|
||||
value: 1.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.28333333
|
||||
value: 0.9
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.38333333
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.41666666
|
||||
value: 0.9
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.45
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.x
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.13333334
|
||||
value: 1.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.28333333
|
||||
value: 0.9
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.38333333
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.41666666
|
||||
value: 0.9
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.45
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.y
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.13333334
|
||||
value: 1.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.28333333
|
||||
value: 0.9
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.38333333
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.41666666
|
||||
value: 0.9
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.45
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.z
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5fd4266a1fc3134293e378a72315d2a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b728266df0af1b4fa7bf513542ff751
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2300047617e8444448c6cb242f8c2bf8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,273 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: LifeUI
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: Recover
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: Remove
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 1107727774132612696}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!114 &114920089147166270
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f7d5bbcfccd21a24a95cf046c5166dc3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &114980154885568056
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f7d5bbcfccd21a24a95cf046c5166dc3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1101 &1101270998068686586
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Remove
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 1102653121394499118}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 0
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &1101387968803871028
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Recover
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 1102491497117534312}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 0
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &1101624081044789072
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 1102224253054077610}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 1
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &1101678955445188244
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 1102224253054077610}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 1
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 0
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &1102224253054077610
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: BlankState
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 1101270998068686586}
|
||||
- {fileID: 1101387968803871028}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 0}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &1102491497117534312
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: RecoverLife
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 1101678955445188244}
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: 114980154885568056}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 49f2ca81c5c51304f86dcb6cb54cb18f, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &1102653121394499118
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: RemoveLife
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 1101624081044789072}
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: 114920089147166270}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: d3499261017bbd4478153f45a9696ecf, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &1107618804857518794
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: New Layer
|
||||
m_ChildStates: []
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 0}
|
||||
--- !u!1107 &1107727774132612696
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102653121394499118}
|
||||
m_Position: {x: 408, y: 12, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102491497117534312}
|
||||
m_Position: {x: 408, y: 132, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102224253054077610}
|
||||
m_Position: {x: 204, y: 72, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 36, y: 72, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 1102224253054077610}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5979a3bdbbeec049ab667240a72c63e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,415 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: RecoverLife
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: {x: 1, y: 1, z: 1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: {x: 0.5, y: 0.5, z: 0.5}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: {x: 1.1, y: 1.1, z: 1.1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path:
|
||||
m_FloatCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.r
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.g
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.b
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.31666666
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.a
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_PPtrCurves:
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: 21300000, guid: e86e8fa234e263d4cbe7493eef3e4419, type: 3}
|
||||
- time: 0.06666667
|
||||
value: {fileID: 21300000, guid: cca8ac75dcb982b45b2fb6fa7eeb6a20, type: 3}
|
||||
attribute: m_Sprite
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 3
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 304273561
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 2015549526
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 1
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 2526845255
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 4215373228
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 2334886179
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping:
|
||||
- {fileID: 21300000, guid: e86e8fa234e263d4cbe7493eef3e4419, type: 3}
|
||||
- {fileID: 21300000, guid: cca8ac75dcb982b45b2fb6fa7eeb6a20, type: 3}
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.31666666
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.r
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.g
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.b
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.31666666
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.a
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1.1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.x
|
||||
path:
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1.1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.y
|
||||
path:
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1.1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.z
|
||||
path:
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49f2ca81c5c51304f86dcb6cb54cb18f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,415 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: RemoveLife
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: {x: 1, y: 1, z: 1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: {x: 0.5, y: 0.5, z: 0.5}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: {x: 1.1, y: 1.1, z: 1.1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path:
|
||||
m_FloatCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.r
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.g
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.b
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.31666666
|
||||
value: 0.703
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.a
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_PPtrCurves:
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: 21300000, guid: cca8ac75dcb982b45b2fb6fa7eeb6a20, type: 3}
|
||||
- time: 0.06666667
|
||||
value: {fileID: 21300000, guid: e86e8fa234e263d4cbe7493eef3e4419, type: 3}
|
||||
attribute: m_Sprite
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 3
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 304273561
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 2015549526
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 1
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 2526845255
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 4215373228
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 2334886179
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping:
|
||||
- {fileID: 21300000, guid: cca8ac75dcb982b45b2fb6fa7eeb6a20, type: 3}
|
||||
- {fileID: 21300000, guid: e86e8fa234e263d4cbe7493eef3e4419, type: 3}
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.31666666
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.r
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.g
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.b
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.31666666
|
||||
value: 0.703
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.a
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1.1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.x
|
||||
path:
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1.1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.y
|
||||
path:
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.06666667
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 0.13333334
|
||||
value: 1.1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.z
|
||||
path:
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user