diff --git a/Assets/Prefabs/Astronaut.prefab b/Assets/Prefabs/Astronaut.prefab index df5704a..3dfd265 100644 --- a/Assets/Prefabs/Astronaut.prefab +++ b/Assets/Prefabs/Astronaut.prefab @@ -145,7 +145,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ab270b0cb2475114ab8eb45661af0df1, type: 3} m_Name: m_EditorClassIdentifier: - PlayerNumber: 1 + PlayerNumber: 0 --- !u!114 &11491252 MonoBehaviour: m_ObjectHideFlags: 1 @@ -158,8 +158,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: aspi: {fileID: 0} - WalkAnimSpeed: 0 - WalkAnimAngle: 0 + WalkAnimSpeed: 4 + WalkAnimAngle: 15 EjectSpinSpeed: 80 DustParticlesEmitter: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2} --- !u!114 &11494368 diff --git a/Assets/Prefabs/P_Shockwave.prefab b/Assets/Prefabs/P_Shockwave.prefab new file mode 100644 index 0000000..24c63c4 --- /dev/null +++ b/Assets/Prefabs/P_Shockwave.prefab @@ -0,0 +1,1552 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &143434 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 406840} + - 198: {fileID: 19869404} + - 199: {fileID: 19977686} + m_Layer: 0 + m_Name: P_Shockwave + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &406840 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 143434} + 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 +--- !u!198 &19869404 +ParticleSystem: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 143434} + serializedVersion: 2 + lengthInSec: 0.1 + startDelay: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + speed: 1 + randomSeed: 0 + looping: 1 + prewarm: 0 + playOnAwake: 1 + moveWithTransform: 1 + scalingMode: 1 + InitialModule: + serializedVersion: 2 + enabled: 1 + startLifetime: + scalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startSpeed: + scalar: 15 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startColor: + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294967295 + maxColor: + serializedVersion: 2 + rgba: 4294967295 + minMaxState: 0 + startSize: + scalar: 4 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0.6666667 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minMaxState: 0 + startRotationX: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotationY: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotation: + scalar: 3.1415925 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minMaxState: 3 + randomizeRotationDirection: 0 + gravityModifier: 0 + maxNumParticles: 100 + rotation3D: 0 + ShapeModule: + serializedVersion: 2 + enabled: 1 + type: 4 + radius: 0.01 + angle: 90 + length: 5 + boxX: 1 + boxY: 1 + boxZ: 1 + arc: 360 + placementMode: 0 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + randomDirection: 0 + EmissionModule: + enabled: 1 + serializedVersion: 2 + m_Type: 0 + rate: + scalar: 10000 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + cnt0: 30 + cnt1: 30 + cnt2: 30 + cnt3: 30 + cntmax0: 30 + cntmax1: 30 + cntmax2: 30 + cntmax3: 30 + time0: 0 + time1: 0 + time2: 0 + time3: 0 + m_BurstCount: 0 + SizeModule: + enabled: 1 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0.115615346 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 0.99369085 + value: 0.3397151 + inSlope: 0.4659751 + outSlope: 0.4659751 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + RotationModule: + enabled: 1 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 2.0943952 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minMaxState: 3 + separateAxes: 0 + ColorModule: + enabled: 1 + gradient: + maxGradient: + key0: + serializedVersion: 2 + rgba: 4280444860 + key1: + serializedVersion: 2 + rgba: 4278190080 + key2: + serializedVersion: 2 + rgba: 2763307 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 65535 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 33539 + atime2: 65535 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 3 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294967295 + maxColor: + serializedVersion: 2 + rgba: 4294967295 + minMaxState: 1 + UVModule: + enabled: 0 + frameOverTime: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + randomRow: 1 + VelocityModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + ForceModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + enabled: 0 + multiplier: 1 + ClampVelocityModule: + enabled: 1 + x: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + magnitude: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxis: 0 + inWorldSpace: 0 + dampen: 0.3 + SizeBySpeedModule: + enabled: 0 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + range: {x: 0, y: 1} + RotationBySpeedModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294967295 + maxColor: + serializedVersion: 2 + rgba: 4294967295 + minMaxState: 1 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 2 + type: 0 + collisionMode: 0 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_Bounce: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_EnergyLossOnCollision: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + minKillSpeed: 0 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 1 + SubModule: + enabled: 0 + subEmitterBirth: {fileID: 0} + subEmitterBirth1: {fileID: 0} + subEmitterCollision: {fileID: 0} + subEmitterCollision1: {fileID: 0} + subEmitterDeath: {fileID: 0} + subEmitterDeath1: {fileID: 0} +--- !u!199 &19977686 +ParticleSystemRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 143434} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 2100000, guid: c7d0e59685de7d7449e84875524fa9c2, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 0 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 2 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} +--- !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: 143434} + m_IsPrefabParent: 1 diff --git a/Assets/Prefabs/P_Shockwave.prefab.meta b/Assets/Prefabs/P_Shockwave.prefab.meta new file mode 100644 index 0000000..7053a90 --- /dev/null +++ b/Assets/Prefabs/P_Shockwave.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a63c057a7a113a349b55d0ae61d0c936 +timeCreated: 1460210347 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Astronaut.cs b/Assets/Scripts/Astronaut.cs index 8bcb149..7a9b098 100644 --- a/Assets/Scripts/Astronaut.cs +++ b/Assets/Scripts/Astronaut.cs @@ -7,7 +7,7 @@ public class Astronaut : MonoBehaviour { private AstronautAnimator _astronautAnimator; public enum AstronautState { - Idle, Walking, Jumping, Dashing, Ejecting, Dead + Idle, Walking, Jumping, Dashing, Stun, Ejecting, Dead } public GameObject Rotator; @@ -56,11 +56,10 @@ public class Astronaut : MonoBehaviour { SpriteDash.gameObject.SetActive(false); }*/ - /*if (_state == AstronautState.Walking) + if (State == AstronautState.Walking) { - //StartCoroutine(WalkingStance()); - _astronautAnimator.Walk(); - }*/ + _astronautAnimator.Walk(walkRight); + } } } @@ -68,6 +67,7 @@ public class Astronaut : MonoBehaviour { private float height = 0; private float vSpeed = 0; private bool grounded = false; + private bool walkRight = false; private float walkTime = 0; private int nextStep = 1; @@ -93,6 +93,7 @@ public class Astronaut : MonoBehaviour { { planet = FindObjectOfType(); } + planet.addPlayer(); State = AstronautState.Idle; theta = 0; @@ -221,6 +222,7 @@ public class Astronaut : MonoBehaviour { } else { + walkRight = move > 0; State = AstronautState.Walking; walkTime = 0f; } @@ -237,7 +239,7 @@ public class Astronaut : MonoBehaviour { float newHeight = GetGroundRadius(newTheta); if (newHeight > height) { - Debug.Log("Blocked by wall"); + //Debug.Log("Blocked by wall"); return; // Blocked by wall } @@ -296,6 +298,8 @@ public class Astronaut : MonoBehaviour { vSpeed = EjectSpeed; _astronautAnimator.Eject(); grounded = false; + + planet.playerDeath(this); } /// @@ -303,7 +307,7 @@ public class Astronaut : MonoBehaviour { /// public void Stun() { - print("Stunned"); + //TODO } public void OnGUI() @@ -311,7 +315,14 @@ public class Astronaut : MonoBehaviour { if (GUI.Button(new Rect(10, 10, 150, 50), State.ToString())) { Debug.Log("Clicked the button with an image"); - Eject(); - } + //_astronautAnimator.Walk(); + //Eject(); + } + /* if (GUI.Button(new Rect(60, 10, 150, 50), "Stop")) + { + Debug.Log("Clicked the button with an image"); + _astronautAnimator.StopWalk(); + //Eject(); + }*/ } } diff --git a/Assets/Scripts/AstronautAnimator.cs b/Assets/Scripts/AstronautAnimator.cs index c2dc410..979d237 100644 --- a/Assets/Scripts/AstronautAnimator.cs +++ b/Assets/Scripts/AstronautAnimator.cs @@ -39,9 +39,10 @@ public class AstronautAnimator : MonoBehaviour { aspi.SpriteDash.gameObject.SetActive(false); } - public void Walk() + public void Walk(bool right) { - StartCoroutine(Rotate()); + Debug.Log("Walking!"); + StartCoroutine(Rotate(right? -1 : 1)); } public void Eject() @@ -58,9 +59,9 @@ public class AstronautAnimator : MonoBehaviour { } } - IEnumerator Rotate() + IEnumerator Rotate(float side) { - for (float i = 0.5f; i < 2.5f; i+= Time.deltaTime*WalkAnimSpeed) + for (float i = 0.5f; i < 1.5f; i+= Time.deltaTime*WalkAnimSpeed) { /*int roundDown = 10; //0.5, 1.5 et 2.5 @@ -70,15 +71,18 @@ public class AstronautAnimator : MonoBehaviour { aspi.SpriteWalk.flipX = !aspi.SpriteWalk.flipX; }*/ float position = Mathf.PingPong(i, 1f); - transform.rotation = Quaternion.Euler(0, 0, (position - 0.5f) * WalkAnimAngle * 2); + transform.localRotation = Quaternion.Euler(0, 0, side * (position - 0.5f) * WalkAnimAngle * 2); yield return null; } if (aspi.State == Astronaut.AstronautState.Walking) { - StartCoroutine(Rotate()); + Debug.Log("Walking again"); + StartCoroutine(Rotate(-side)); } - yield return null; + else + Debug.Log("Walking stop"); + //yield return null; } public void EmitDustParticules() diff --git a/Assets/Scripts/PlanetManager.cs b/Assets/Scripts/PlanetManager.cs index 1c29ed2..7dfc99f 100644 --- a/Assets/Scripts/PlanetManager.cs +++ b/Assets/Scripts/PlanetManager.cs @@ -19,9 +19,11 @@ public class PlanetManager : MonoBehaviour private float disbalance = 0f; public GameObject WedgePrefab = null; public List wedges = new List(); + private int numPlayer; // Use this for initialization public void Awake () { + numPlayer = 0; TailleCartiersEnDegres = 360.0f / NbCartiers; balanceValue = (CartierMaxRatio + CartierMinRatio) / 2; @@ -47,6 +49,11 @@ public class PlanetManager : MonoBehaviour } + public void addPlayer() + { + numPlayer++; + } + public void setColor(float val) { foreach (Wedge w in wedges) { @@ -187,7 +194,7 @@ public class PlanetManager : MonoBehaviour //si player sur la plateforme et grounded if (w.tMax >= p.GetTheta() && p.GetTheta() >= w.tMin && p.IsGrounded()) { - p.Eject(); + p.Eject(); } } } @@ -195,6 +202,23 @@ public class PlanetManager : MonoBehaviour } } + public void playerDeath(Astronaut aPlayer) + { + numPlayer--; + //check if all players are dead + if (numPlayer < 2) + { + if (numPlayer < 1) + { + print("game is lost"); + } + else + { + print("winner is you!"); + } + } + } + //public void PushWedge(float thetaPlayerX) //{ // var index = GetWedgeIndex(thetaPlayerX); diff --git a/Assets/_Scenes/Main.unity b/Assets/_Scenes/Main.unity index c4c8dd0..a0c5f8d 100644 --- a/Assets/_Scenes/Main.unity +++ b/Assets/_Scenes/Main.unity @@ -132,10 +132,6 @@ Prefab: propertyPath: m_Name value: Astronaut_0 objectReference: {fileID: 0} - - target: {fileID: 11434752, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} - propertyPath: PlayerNumber - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} m_IsPrefabParent: 0 @@ -515,6 +511,10 @@ Prefab: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 11434752, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: PlayerNumber + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} m_IsPrefabParent: 0