diff --git a/playable/.DS_Store b/playable/.DS_Store new file mode 100644 index 0000000..233f08c Binary files /dev/null and b/playable/.DS_Store differ diff --git a/playable/Assets/.DS_Store b/playable/Assets/.DS_Store new file mode 100644 index 0000000..c201f4d Binary files /dev/null and b/playable/Assets/.DS_Store differ diff --git a/playable/Assets/Lachlan_jump_work.unity b/playable/Assets/Lachlan_jump_work.unity new file mode 100644 index 0000000..cc72bc5 Binary files /dev/null and b/playable/Assets/Lachlan_jump_work.unity differ diff --git a/playable/Assets/Lachlan_jump_work.unity.meta b/playable/Assets/Lachlan_jump_work.unity.meta new file mode 100644 index 0000000..e26cfb1 --- /dev/null +++ b/playable/Assets/Lachlan_jump_work.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 7929efa0d0fa84d269f932355f708f12 +DefaultImporter: + userData: diff --git a/playable/Assets/Main Camera.prefab b/playable/Assets/Main Camera.prefab new file mode 100644 index 0000000..2da1082 Binary files /dev/null and b/playable/Assets/Main Camera.prefab differ diff --git a/playable/Assets/Main Camera.prefab.meta b/playable/Assets/Main Camera.prefab.meta new file mode 100644 index 0000000..6a11ca1 --- /dev/null +++ b/playable/Assets/Main Camera.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: c9c7412211778407f9c1450e23c597fc +NativeFormatImporter: + userData: diff --git a/playable/Assets/Materials.meta b/playable/Assets/Materials.meta new file mode 100644 index 0000000..325179b --- /dev/null +++ b/playable/Assets/Materials.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 334a07353496b3f4682903e0a28dbad0 +folderAsset: yes +DefaultImporter: + userData: diff --git a/playable/Assets/Materials/lambert1.mat b/playable/Assets/Materials/lambert1.mat new file mode 100644 index 0000000..d05ff69 Binary files /dev/null and b/playable/Assets/Materials/lambert1.mat differ diff --git a/playable/Assets/Materials/lambert1.mat.meta b/playable/Assets/Materials/lambert1.mat.meta new file mode 100644 index 0000000..1b7cf07 --- /dev/null +++ b/playable/Assets/Materials/lambert1.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ef3b7b6cdc3ee234899234695bd8d7c3 +NativeFormatImporter: + userData: diff --git a/playable/Assets/Materials/pillar_unrapped 1.mat b/playable/Assets/Materials/pillar_unrapped 1.mat new file mode 100644 index 0000000..f3fba7a Binary files /dev/null and b/playable/Assets/Materials/pillar_unrapped 1.mat differ diff --git a/playable/Assets/Materials/pillar_unrapped 1.mat.meta b/playable/Assets/Materials/pillar_unrapped 1.mat.meta new file mode 100644 index 0000000..ac13cb0 --- /dev/null +++ b/playable/Assets/Materials/pillar_unrapped 1.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 001b004239ebbc846b32fe5e3bbab73c +NativeFormatImporter: + userData: diff --git a/playable/Assets/Materials/pillar_unrapped.mat b/playable/Assets/Materials/pillar_unrapped.mat new file mode 100644 index 0000000..6399eaa Binary files /dev/null and b/playable/Assets/Materials/pillar_unrapped.mat differ diff --git a/playable/Assets/Materials/pillar_unrapped.mat.meta b/playable/Assets/Materials/pillar_unrapped.mat.meta new file mode 100644 index 0000000..664f70d --- /dev/null +++ b/playable/Assets/Materials/pillar_unrapped.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 4e19020496989f94dba07a0025059bcf +NativeFormatImporter: + userData: diff --git a/playable/Assets/Materials/platform_texture.mat b/playable/Assets/Materials/platform_texture.mat new file mode 100644 index 0000000..a247928 Binary files /dev/null and b/playable/Assets/Materials/platform_texture.mat differ diff --git a/playable/Assets/Materials/platform_texture.mat.meta b/playable/Assets/Materials/platform_texture.mat.meta new file mode 100644 index 0000000..9dc3b70 --- /dev/null +++ b/playable/Assets/Materials/platform_texture.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 0ed59f0aa227af74e943e157e83fd03e +NativeFormatImporter: + userData: diff --git a/playable/Assets/New Terrain.asset b/playable/Assets/New Terrain.asset new file mode 100644 index 0000000..bb7b28a Binary files /dev/null and b/playable/Assets/New Terrain.asset differ diff --git a/playable/Assets/New Terrain.asset.meta b/playable/Assets/New Terrain.asset.meta new file mode 100644 index 0000000..90162b2 --- /dev/null +++ b/playable/Assets/New Terrain.asset.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: a03922fd2222daf45aa6220f0ae167ad +NativeFormatImporter: + userData: diff --git a/playable/Assets/P2_weapon.cs b/playable/Assets/P2_weapon.cs new file mode 100644 index 0000000..df1aa8e --- /dev/null +++ b/playable/Assets/P2_weapon.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using System.Collections; + +public class P2_weapon : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + void Update (){ + if (Input.GetKeyDown("space")) + transform.Translate (Vector3.right); + else if (Input.GetKeyUp("space")) + transform.Translate (Vector3.left); + + } + + // Update is called once per frame + +} \ No newline at end of file diff --git a/playable/Assets/P2_weapon.cs.meta b/playable/Assets/P2_weapon.cs.meta new file mode 100644 index 0000000..dc87fb3 --- /dev/null +++ b/playable/Assets/P2_weapon.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f348d28f3452e574c9fe07574e3ca5ee +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/playable/Assets/Platform_obj.fbx b/playable/Assets/Platform_obj.fbx new file mode 100644 index 0000000..0cc2ed7 Binary files /dev/null and b/playable/Assets/Platform_obj.fbx differ diff --git a/playable/Assets/Platform_obj.fbx.meta b/playable/Assets/Platform_obj.fbx.meta new file mode 100644 index 0000000..bdc3bb4 --- /dev/null +++ b/playable/Assets/Platform_obj.fbx.meta @@ -0,0 +1,99 @@ +fileFormatVersion: 2 +guid: 96897ea8068e16045a2b6b10cf1b62dd +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: pCube1 + 100002: pCylinder1 + 100004: //RootNode + 100006: polySurface2 + 100008: polySurface3 + 100010: polySurface4 + 100012: polySurface5 + 100014: polySurface6 + 100016: polySurface7 + 100018: polySurface9 + 100020: transform1 + 100022: transform2 + 100024: transform3 + 100026: transform4 + 100028: transform5 + 100030: transform6 + 100032: transform7 + 100034: transform8 + 400000: pCube1 + 400002: pCylinder1 + 400004: //RootNode + 400006: polySurface2 + 400008: polySurface3 + 400010: polySurface4 + 400012: polySurface5 + 400014: polySurface6 + 400016: polySurface7 + 400018: polySurface9 + 400020: transform1 + 400022: transform2 + 400024: transform3 + 400026: transform4 + 400028: transform5 + 400030: transform6 + 400032: transform7 + 400034: transform8 + 2300000: polySurface9 + 3300000: polySurface9 + 4300000: polySurface9 + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .00999999978 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/playable/Assets/PlayerControler.cs b/playable/Assets/PlayerControler.cs new file mode 100644 index 0000000..6bc63a0 --- /dev/null +++ b/playable/Assets/PlayerControler.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System.Collections; + +public class PlayerControler : MonoBehaviour { + + // Use this for initialization + void Start () { + } + + public float speed; + public Vector2 jumpVector; + public GameObject bullet; + bool canJump = true; + + + + void Update() { + Vector2 velo = rigidbody2D.velocity; + velo.x = Input.GetAxis ("Horizontal_P1") * speed; + rigidbody2D.velocity = velo; + + if (Input.GetKey (KeyCode.UpArrow)){ + if (canJump == true){ + rigidbody2D.velocity = jumpVector; + canJump = false; + } + } + + //if (Input.GetKey (KeyCode.Space)){ + //shoot + //GameObject bulletGO = Instantiate (bullet) as GameObject; + //bulletGO.transform.position = transform.position; + //} + } + void OnCollisionEnter2D(Collision2D col){ + if (col.collider.tag == "ground") + canJump = true; + else if(col.collider.tag == "Player") + canJump = true; + } + +} diff --git a/playable/Assets/PlayerControler.cs.meta b/playable/Assets/PlayerControler.cs.meta new file mode 100644 index 0000000..8794a99 --- /dev/null +++ b/playable/Assets/PlayerControler.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2f110149822ba46b39723c6d01336581 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/playable/Assets/bounce.physicsMaterial2D b/playable/Assets/bounce.physicsMaterial2D new file mode 100644 index 0000000..7559879 Binary files /dev/null and b/playable/Assets/bounce.physicsMaterial2D differ diff --git a/playable/Assets/bounce.physicsMaterial2D.meta b/playable/Assets/bounce.physicsMaterial2D.meta new file mode 100644 index 0000000..c4a19cc --- /dev/null +++ b/playable/Assets/bounce.physicsMaterial2D.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 0b5d5cd6009d64349bcb76767e5bf374 +NativeFormatImporter: + userData: diff --git a/playable/Assets/bullet.prefab b/playable/Assets/bullet.prefab new file mode 100644 index 0000000..f9061be Binary files /dev/null and b/playable/Assets/bullet.prefab differ diff --git a/playable/Assets/bullet.prefab.meta b/playable/Assets/bullet.prefab.meta new file mode 100644 index 0000000..0bdaf41 --- /dev/null +++ b/playable/Assets/bullet.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ebb0d5e70fdd4442f970c56d96d1458a +NativeFormatImporter: + userData: diff --git a/playable/Assets/bulletScript.cs b/playable/Assets/bulletScript.cs new file mode 100644 index 0000000..eef6c2f --- /dev/null +++ b/playable/Assets/bulletScript.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +public class bulletScript : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/playable/Assets/bulletScript.cs.meta b/playable/Assets/bulletScript.cs.meta new file mode 100644 index 0000000..4f3b724 --- /dev/null +++ b/playable/Assets/bulletScript.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 23f72220ec483487aa9bf941388b45e7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/playable/Assets/camera_controls.cs b/playable/Assets/camera_controls.cs new file mode 100644 index 0000000..feb8f97 --- /dev/null +++ b/playable/Assets/camera_controls.cs @@ -0,0 +1,13 @@ +using UnityEngine; +using System.Collections; + +public class camera_controls : MonoBehaviour { + + + public Transform target; + + // Update is called once per frame + void Update () { + transform.LookAt (target); + } +} diff --git a/playable/Assets/camera_controls.cs.meta b/playable/Assets/camera_controls.cs.meta new file mode 100644 index 0000000..45bbff6 --- /dev/null +++ b/playable/Assets/camera_controls.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 045a6233a4cf68244bcbd915a1ce4eb0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/playable/Assets/floating_platform_02.mb b/playable/Assets/floating_platform_02.mb new file mode 100644 index 0000000..b9b1cbd Binary files /dev/null and b/playable/Assets/floating_platform_02.mb differ diff --git a/playable/Assets/floating_platform_02.mb.meta b/playable/Assets/floating_platform_02.mb.meta new file mode 100644 index 0000000..aae8047 --- /dev/null +++ b/playable/Assets/floating_platform_02.mb.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 46d43006d4940ab48a54b4aff194420e +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: //RootNode + 100002: pCube1 + 100004: pCylinder1 + 100006: polySurface2 + 100008: polySurface3 + 100010: polySurface4 + 100012: polySurface5 + 100014: polySurface6 + 100016: polySurface7 + 100018: polySurface8 + 100020: polySurface9 + 100022: transform1 + 100024: transform2 + 100026: transform3 + 100028: transform4 + 100030: transform5 + 100032: transform6 + 100034: transform7 + 400000: //RootNode + 400002: pCube1 + 400004: pCylinder1 + 400006: polySurface2 + 400008: polySurface3 + 400010: polySurface4 + 400012: polySurface5 + 400014: polySurface6 + 400016: polySurface7 + 400018: polySurface8 + 400020: polySurface9 + 400022: transform1 + 400024: transform2 + 400026: transform3 + 400028: transform4 + 400030: transform5 + 400032: transform6 + 400034: transform7 + 2300000: pCylinder1 + 2300002: polySurface8 + 2300004: polySurface9 + 3300000: pCylinder1 + 3300002: polySurface8 + 3300004: polySurface9 + 4300000: polySurface8 + 4300002: polySurface9 + 4300004: pCylinder1 + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/playable/Assets/pillar_obj.fbx b/playable/Assets/pillar_obj.fbx new file mode 100644 index 0000000..4fd3683 Binary files /dev/null and b/playable/Assets/pillar_obj.fbx differ diff --git a/playable/Assets/pillar_obj.fbx.meta b/playable/Assets/pillar_obj.fbx.meta new file mode 100644 index 0000000..cd3c22f --- /dev/null +++ b/playable/Assets/pillar_obj.fbx.meta @@ -0,0 +1,83 @@ +fileFormatVersion: 2 +guid: c5c501b1516413f4d916ad0a9aa39dee +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: pCube1 + 100002: pCube2 + 100004: //RootNode + 100006: polySurface1 + 100008: polySurface2 + 100010: polySurface3 + 100012: transform1 + 100014: transform2 + 100016: transform3 + 100018: transform4 + 400000: pCube1 + 400002: pCube2 + 400004: //RootNode + 400006: polySurface1 + 400008: polySurface2 + 400010: polySurface3 + 400012: transform1 + 400014: transform2 + 400016: transform3 + 400018: transform4 + 2300000: polySurface3 + 3300000: polySurface3 + 4300000: polySurface3 + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .00999999978 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/playable/Assets/pillar_unrapped.jpg b/playable/Assets/pillar_unrapped.jpg new file mode 100644 index 0000000..f0deb0d Binary files /dev/null and b/playable/Assets/pillar_unrapped.jpg differ diff --git a/playable/Assets/pillar_unrapped.jpg.meta b/playable/Assets/pillar_unrapped.jpg.meta new file mode 100644 index 0000000..feafe66 --- /dev/null +++ b/playable/Assets/pillar_unrapped.jpg.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: f37370ad476d899488b6ffff02c320a0 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/playable/Assets/platform_texture.jpg b/playable/Assets/platform_texture.jpg new file mode 100644 index 0000000..b0e3654 Binary files /dev/null and b/playable/Assets/platform_texture.jpg differ diff --git a/playable/Assets/platform_texture.jpg.meta b/playable/Assets/platform_texture.jpg.meta new file mode 100644 index 0000000..bee8720 --- /dev/null +++ b/playable/Assets/platform_texture.jpg.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8126159699ad4be41b6ec1224406e340 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/playable/Assets/player2_controls.cs b/playable/Assets/player2_controls.cs new file mode 100644 index 0000000..0db15b6 --- /dev/null +++ b/playable/Assets/player2_controls.cs @@ -0,0 +1,45 @@ +using UnityEngine; +using System.Collections; + +public class player2_controls : MonoBehaviour { + + void Start () { + + } + + public float speed; + public Vector2 jumpVector; + public GameObject bullet; + bool canJump = true; + + + + + void Update() { + Vector2 velo = rigidbody2D.velocity; + velo.x = Input.GetAxis ("Horizontal_P2") * speed; + rigidbody2D.velocity = velo; + + if (Input.GetKey (KeyCode.W)){ + if (canJump == true){ + rigidbody2D.velocity = jumpVector; + canJump = false; + } + } + + //if (Input.GetKey (KeyCode.Space)){ + //shoot + //GameObject bulletGO = Instantiate (bullet) as GameObject; + //bulletGO.transform.position = transform.position; + //} + } + + void OnCollisionEnter2D(Collision2D col){ + if (col.collider.tag == "ground") + canJump = true; + else if(col.collider.tag == "Player") + canJump = true; + } + + +} \ No newline at end of file diff --git a/playable/Assets/player2_controls.cs.meta b/playable/Assets/player2_controls.cs.meta new file mode 100644 index 0000000..746abb2 --- /dev/null +++ b/playable/Assets/player2_controls.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e1ccee01ee999524e8c0e99f0e5ac3d8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/playable/Assets/sc.cs b/playable/Assets/sc.cs new file mode 100644 index 0000000..48d9bfc --- /dev/null +++ b/playable/Assets/sc.cs @@ -0,0 +1,16 @@ +using UnityEngine; +using System.Collections; + +public class sc : MonoBehaviour { + Quaternion rotation; + + // Use this for initialization + void Awake () { + rotation = transform.rotation; + } + + // Update is called once per frame + void LateUpdate () { + transform.rotation = rotation; + } +} diff --git a/playable/Assets/sc.cs.meta b/playable/Assets/sc.cs.meta new file mode 100644 index 0000000..6a19955 --- /dev/null +++ b/playable/Assets/sc.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8664bb421145d654e8a7367a64b7ca5e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/playable/ProjectSettings/AudioManager.asset b/playable/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..e971d21 Binary files /dev/null and b/playable/ProjectSettings/AudioManager.asset differ diff --git a/playable/ProjectSettings/DynamicsManager.asset b/playable/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..655a767 Binary files /dev/null and b/playable/ProjectSettings/DynamicsManager.asset differ diff --git a/playable/ProjectSettings/EditorBuildSettings.asset b/playable/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..d02b9cd Binary files /dev/null and b/playable/ProjectSettings/EditorBuildSettings.asset differ diff --git a/playable/ProjectSettings/EditorSettings.asset b/playable/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..7fa5ee5 Binary files /dev/null and b/playable/ProjectSettings/EditorSettings.asset differ diff --git a/playable/ProjectSettings/GraphicsSettings.asset b/playable/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..c0ee0ec Binary files /dev/null and b/playable/ProjectSettings/GraphicsSettings.asset differ diff --git a/playable/ProjectSettings/InputManager.asset b/playable/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..9c16f77 Binary files /dev/null and b/playable/ProjectSettings/InputManager.asset differ diff --git a/playable/ProjectSettings/NavMeshLayers.asset b/playable/ProjectSettings/NavMeshLayers.asset new file mode 100644 index 0000000..22e2058 Binary files /dev/null and b/playable/ProjectSettings/NavMeshLayers.asset differ diff --git a/playable/ProjectSettings/NetworkManager.asset b/playable/ProjectSettings/NetworkManager.asset new file mode 100644 index 0000000..3e988a1 Binary files /dev/null and b/playable/ProjectSettings/NetworkManager.asset differ diff --git a/playable/ProjectSettings/Physics2DSettings.asset b/playable/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..9b87d5f Binary files /dev/null and b/playable/ProjectSettings/Physics2DSettings.asset differ diff --git a/playable/ProjectSettings/ProjectSettings.asset b/playable/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..1030463 Binary files /dev/null and b/playable/ProjectSettings/ProjectSettings.asset differ diff --git a/playable/ProjectSettings/QualitySettings.asset b/playable/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..9cd45cb Binary files /dev/null and b/playable/ProjectSettings/QualitySettings.asset differ diff --git a/playable/ProjectSettings/TagManager.asset b/playable/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..16fc12e Binary files /dev/null and b/playable/ProjectSettings/TagManager.asset differ diff --git a/playable/ProjectSettings/TimeManager.asset b/playable/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..6a2964f Binary files /dev/null and b/playable/ProjectSettings/TimeManager.asset differ