diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..bbea2b7 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: bf06927499339fe4399da56cb819cb52 +folderAsset: yes +timeCreated: 1524272602 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Player.controller b/Assets/Animations/Player.controller new file mode 100644 index 0000000..50cdf27 --- /dev/null +++ b/Assets/Animations/Player.controller @@ -0,0 +1,133 @@ +%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: Player + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: xSpeed + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} + - m_Name: ySpeed + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} + - m_Name: isShooting + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 1107238305400026780} + 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!206 &206626242214030278 +BlendTree: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Blend Tree + m_Childs: + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: d550ac477d8eb2d4b804b75e1e0a8ee7, type: 2} + m_Threshold: 0 + m_Position: {x: 0, y: -1} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: xSpeed + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: cbb4fe0482b26314bb75e7133347be94, type: 2} + m_Threshold: 0.33333334 + m_Position: {x: 0, y: 1} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: xSpeed + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: f77cf01cbc39b14489dc44051c717a06, type: 2} + m_Threshold: 0.6666667 + m_Position: {x: -1, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: xSpeed + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: c37f7a4b513c3e14195a54872f0d04fc, type: 2} + m_Threshold: 1 + m_Position: {x: 1, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: xSpeed + m_Mirror: 0 + m_BlendParameter: xSpeed + m_BlendParameterY: ySpeed + m_MinThreshold: 0 + m_MaxThreshold: 1 + m_UseAutomaticThresholds: 1 + m_NormalizedBlendValues: 0 + m_BlendType: 1 +--- !u!1102 &1102328909801072622 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Blend Tree + 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: 206626242214030278} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &1107238305400026780 +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: 1102328909801072622} + m_Position: {x: 264, 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: 1102328909801072622} diff --git a/Assets/Animations/Player.controller.meta b/Assets/Animations/Player.controller.meta new file mode 100644 index 0000000..7830436 --- /dev/null +++ b/Assets/Animations/Player.controller.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: cbc7ce4eb98401f49a1122a3c03e5c92 +timeCreated: 1524274222 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Player_Down.anim b/Assets/Animations/Player_Down.anim new file mode 100644 index 0000000..0e69455 --- /dev/null +++ b/Assets/Animations/Player_Down.anim @@ -0,0 +1,82 @@ +%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: Player_Down + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + 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: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.016666668 + 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: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: + - time: 0 + functionName: + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 + - time: 0 + functionName: + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 diff --git a/Assets/Animations/Player_Down.anim.meta b/Assets/Animations/Player_Down.anim.meta new file mode 100644 index 0000000..59a71bd --- /dev/null +++ b/Assets/Animations/Player_Down.anim.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d550ac477d8eb2d4b804b75e1e0a8ee7 +timeCreated: 1524274388 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Player_Left.anim b/Assets/Animations/Player_Left.anim new file mode 100644 index 0000000..8f97b29 --- /dev/null +++ b/Assets/Animations/Player_Left.anim @@ -0,0 +1,71 @@ +%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: Player_Left + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 21300006, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + - time: 1 + value: {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + 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: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 21300006, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + - {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.0166667 + 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: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: [] diff --git a/Assets/Animations/Player_Left.anim.meta b/Assets/Animations/Player_Left.anim.meta new file mode 100644 index 0000000..2b9b6a7 --- /dev/null +++ b/Assets/Animations/Player_Left.anim.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f77cf01cbc39b14489dc44051c717a06 +timeCreated: 1524274437 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Player_Right.anim b/Assets/Animations/Player_Right.anim new file mode 100644 index 0000000..492a62a --- /dev/null +++ b/Assets/Animations/Player_Right.anim @@ -0,0 +1,71 @@ +%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: Player_Right + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 21300004, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + - time: 1 + value: {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + 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: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 21300004, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + - {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.0166667 + 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: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: [] diff --git a/Assets/Animations/Player_Right.anim.meta b/Assets/Animations/Player_Right.anim.meta new file mode 100644 index 0000000..f6a4ae9 --- /dev/null +++ b/Assets/Animations/Player_Right.anim.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c37f7a4b513c3e14195a54872f0d04fc +timeCreated: 1524274444 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Player_Up.anim b/Assets/Animations/Player_Up.anim new file mode 100644 index 0000000..cd2a06a --- /dev/null +++ b/Assets/Animations/Player_Up.anim @@ -0,0 +1,71 @@ +%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: Player_Up + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 21300002, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + - time: 1 + value: {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + 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: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 21300002, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + - {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.0166667 + 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: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: [] diff --git a/Assets/Animations/Player_Up.anim.meta b/Assets/Animations/Player_Up.anim.meta new file mode 100644 index 0000000..30f4257 --- /dev/null +++ b/Assets/Animations/Player_Up.anim.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: cbb4fe0482b26314bb75e7133347be94 +timeCreated: 1524274431 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/gameplay.unity b/Assets/Scenes/gameplay.unity index 6c327f1..8c0d754 100644 --- a/Assets/Scenes/gameplay.unity +++ b/Assets/Scenes/gameplay.unity @@ -165,7 +165,7 @@ Camera: far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 5 + orthographic size: 1 m_Depth: -1 m_CullingMask: serializedVersion: 2 @@ -194,3 +194,153 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1602044328 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1602044334} + - component: {fileID: 1602044333} + - component: {fileID: 1602044332} + - component: {fileID: 1602044331} + - component: {fileID: 1602044330} + - component: {fileID: 1602044329} + m_Layer: 0 + m_Name: Player + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1602044329 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602044328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c9a7a743ce869904ca255dc7e2ecd693, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!61 &1602044330 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602044328} + 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.32, y: 0.32} + newSize: {x: 0.32, y: 0.32} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 0.16, y: 0.24} + m_EdgeRadius: 0 +--- !u!50 &1602044331 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602044328} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!95 &1602044332 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602044328} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: cbc7ce4eb98401f49a1122a3c03e5c92, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!212 &1602044333 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602044328} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 52ef75616890e664ca6a6f6fbc2e8039, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.32, y: 0.32} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 +--- !u!4 &1602044334 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602044328} + 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: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Scripts.meta b/Assets/Scripts.meta new file mode 100644 index 0000000..f5c091a --- /dev/null +++ b/Assets/Scripts.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: cafbaaae8c510ca428c50c0b245e7f5c +folderAsset: yes +timeCreated: 1524272716 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs new file mode 100644 index 0000000..027f665 --- /dev/null +++ b/Assets/Scripts/Player.cs @@ -0,0 +1,55 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Player : MonoBehaviour { + Animator animator; + Rigidbody2D rigidBody; + + float speed; + Vector2 deltaForce; + Vector2 lastDirection; + bool isShooting; + + void Awake() { + animator = GetComponent (); + rigidBody = GetComponent (); + + speed = 1f; + } + + void Update() { + HandleInput (); + Move (); + SendAnimationInfo (); + } + + void HandleInput() { + //determine the input from the player + float horizontal = Input.GetAxis ("Horizontal"); + float vertical = Input.GetAxis ("Vertical"); + + deltaForce = new Vector2 (horizontal, vertical); + + //calculate last direction + if (deltaForce != Vector2.zero) { + lastDirection = rigidBody.velocity; + } + + //calculate if shooting + isShooting = Input.GetButton ("Attack"); + } + + void Move() { + //determine how to move the character + rigidBody.velocity = Vector2.zero; + Vector2 impulse = deltaForce.normalized * speed; + rigidBody.AddForce (impulse, ForceMode2D.Impulse); + } + + void SendAnimationInfo() { + animator.SetFloat ("xSpeed", lastDirection.x); + animator.SetFloat ("ySpeed", lastDirection.y); + animator.SetBool ("isShooting", isShooting); + } +} diff --git a/Assets/Scripts/Player.cs.meta b/Assets/Scripts/Player.cs.meta new file mode 100644 index 0000000..bad5830 --- /dev/null +++ b/Assets/Scripts/Player.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: c9a7a743ce869904ca255dc7e2ecd693 +timeCreated: 1524272726 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites.meta b/Assets/Sprites.meta new file mode 100644 index 0000000..9905e58 --- /dev/null +++ b/Assets/Sprites.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d3b44b2d19ef129469a915b20825cc36 +folderAsset: yes +timeCreated: 1524268863 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/projectiles.png b/Assets/Sprites/projectiles.png new file mode 100644 index 0000000..406d92a --- /dev/null +++ b/Assets/Sprites/projectiles.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a76a34960588e89feb62b390f4b4608407c043dd02f32051fb5b00cca071dade +size 479 diff --git a/Assets/Sprites/projectiles.png.meta b/Assets/Sprites/projectiles.png.meta new file mode 100644 index 0000000..c697319 --- /dev/null +++ b/Assets/Sprites/projectiles.png.meta @@ -0,0 +1,157 @@ +fileFormatVersion: 2 +guid: 4a78316eda9aad14bb3a456e2f28b38d +timeCreated: 1524269820 +licenseType: Free +TextureImporter: + fileIDToRecycleName: + 21300000: projectiles_0 + 21300002: projectiles_1 + 21300004: projectiles_2 + 21300006: projectiles_3 + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 0 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: projectiles_0 + rect: + serializedVersion: 2 + x: 0 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: projectiles_1 + rect: + serializedVersion: 2 + x: 16 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: projectiles_2 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: projectiles_3 + rect: + serializedVersion: 2 + x: 16 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/tiles_ip.png b/Assets/Sprites/tiles_ip.png new file mode 100644 index 0000000..0579c17 --- /dev/null +++ b/Assets/Sprites/tiles_ip.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a03513c4aa4d7cbe202c273217364cc6de37e8d6535342c3ddee8aab44ad677 +size 910 diff --git a/Assets/Sprites/tiles_ip.png.meta b/Assets/Sprites/tiles_ip.png.meta new file mode 100644 index 0000000..cdbc004 --- /dev/null +++ b/Assets/Sprites/tiles_ip.png.meta @@ -0,0 +1,232 @@ +fileFormatVersion: 2 +guid: f0425e92c7345064ab2dccbd778f3b15 +timeCreated: 1524268863 +licenseType: Free +TextureImporter: + fileIDToRecycleName: + 21300000: tiles_ip_0 + 21300002: tiles_ip_1 + 21300004: tiles_ip_2 + 21300006: tiles_ip_3 + 21300008: tiles_ip_4 + 21300010: tiles_ip_5 + 21300012: tiles_ip_6 + 21300014: tiles_ip_7 + 21300016: tiles_ip_8 + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 0 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: tiles_ip_0 + rect: + serializedVersion: 2 + x: 0 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: tiles_ip_1 + rect: + serializedVersion: 2 + x: 16 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: tiles_ip_2 + rect: + serializedVersion: 2 + x: 32 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: tiles_ip_3 + rect: + serializedVersion: 2 + x: 48 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: tiles_ip_4 + rect: + serializedVersion: 2 + x: 64 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: tiles_ip_5 + rect: + serializedVersion: 2 + x: 80 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: tiles_ip_6 + rect: + serializedVersion: 2 + x: 96 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: tiles_ip_7 + rect: + serializedVersion: 2 + x: 112 + y: 16 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: tiles_ip_8 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/temp_guy_shoot.png b/Assets/temp_guy_shoot.png new file mode 100644 index 0000000..b58c20c --- /dev/null +++ b/Assets/temp_guy_shoot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:649e08561fa4251062e6fc81d168d53cf14e203b60aa2920536f1200872b547a +size 500 diff --git a/Assets/temp_guy_shoot.png.meta b/Assets/temp_guy_shoot.png.meta new file mode 100644 index 0000000..02a9336 --- /dev/null +++ b/Assets/temp_guy_shoot.png.meta @@ -0,0 +1,157 @@ +fileFormatVersion: 2 +guid: 52ef75616890e664ca6a6f6fbc2e8039 +timeCreated: 1524269820 +licenseType: Free +TextureImporter: + fileIDToRecycleName: + 21300000: temp_guy_shoot_0 + 21300002: temp_guy_shoot_1 + 21300004: temp_guy_shoot_2 + 21300006: temp_guy_shoot_3 + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 0 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: temp_guy_shoot_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: temp_guy_shoot_1 + rect: + serializedVersion: 2 + x: 32 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: temp_guy_shoot_2 + rect: + serializedVersion: 2 + x: 64 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + - serializedVersion: 2 + name: temp_guy_shoot_3 + rect: + serializedVersion: 2 + x: 96 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset index 26ccfc5..5279861 100644 --- a/ProjectSettings/EditorSettings.asset +++ b/ProjectSettings/EditorSettings.asset @@ -4,7 +4,7 @@ EditorSettings: m_ObjectHideFlags: 0 serializedVersion: 7 - m_ExternalVersionControlSupport: Hidden Meta Files + m_ExternalVersionControlSupport: Visible Meta Files m_SerializationMode: 2 m_LineEndingsForNewScripts: 2 m_DefaultBehaviorMode: 1