diff --git a/Assets/Backgrounds.meta b/Assets/Backgrounds.meta new file mode 100644 index 0000000..4ec0bc1 --- /dev/null +++ b/Assets/Backgrounds.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e2ea3bd7807a1b24986c6e03799bb01c +folderAsset: yes +timeCreated: 1523336538 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Backgrounds/forest.png b/Assets/Backgrounds/forest.png new file mode 100644 index 0000000..e9a69dc --- /dev/null +++ b/Assets/Backgrounds/forest.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46610cfec1b0f81f3b8c060b0988860bfe740dbca064b891db2401cd1d77c932 +size 3675703 diff --git a/Assets/Backgrounds/forest.png.meta b/Assets/Backgrounds/forest.png.meta new file mode 100644 index 0000000..4976411 --- /dev/null +++ b/Assets/Backgrounds/forest.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 792e2fed812630f4aaad38fc206f0d92 +timeCreated: 1523336540 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + 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: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + 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: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs.meta b/Assets/Prefabs.meta new file mode 100644 index 0000000..3e983a9 --- /dev/null +++ b/Assets/Prefabs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 34d7cf25b94c3c448aa74d4c4a32d1cc +folderAsset: yes +timeCreated: 1523341952 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Slime.prefab b/Assets/Prefabs/Slime.prefab new file mode 100644 index 0000000..5641f05 --- /dev/null +++ b/Assets/Prefabs/Slime.prefab @@ -0,0 +1,145 @@ +%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: 1303357507213898} + m_IsPrefabParent: 1 +--- !u!1 &1303357507213898 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4692301846406436} + - component: {fileID: 212758213136555284} + - component: {fileID: 50558632102582392} + - component: {fileID: 61154556572051528} + - component: {fileID: 114347888019970256} + m_Layer: 0 + m_Name: Slime + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4692301846406436 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1303357507213898} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 3, y: 3, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!50 &50558632102582392 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1303357507213898} + 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!61 &61154556572051528 +BoxCollider2D: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1303357507213898} + 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} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 0.64, y: 0.64} + newSize: {x: 0.64, y: 0.64} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 0.64, y: 0.64} + m_EdgeRadius: 0 +--- !u!114 &114347888019970256 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1303357507213898} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eac2f64158454a043b4b2ed57afad7de, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!212 &212758213136555284 +SpriteRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1303357507213898} + 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: -1858500921 + m_SortingLayer: 1 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 8143d54795a231548b897c9b6f4e3da9, 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.64, y: 0.64} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 diff --git a/Assets/Prefabs/Slime.prefab.meta b/Assets/Prefabs/Slime.prefab.meta new file mode 100644 index 0000000..fce5bde --- /dev/null +++ b/Assets/Prefabs/Slime.prefab.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: de4fdabdbf5460e499dcbc3b6c56e49d +timeCreated: 1523341956 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/gameplay.unity b/Assets/Scenes/gameplay.unity index 7b3820a..f40c7f4 100644 --- a/Assets/Scenes/gameplay.unity +++ b/Assets/Scenes/gameplay.unity @@ -113,6 +113,90 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &1453867828 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1453867830} + - component: {fileID: 1453867829} + m_Layer: 0 + m_Name: GameController + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1453867829 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1453867828} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18951b66066a27e469e4ff1a02456942, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1453867830 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1453867828} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.6607285, y: -2.7753057, z: -4.515455} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1944597820 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1944597822} + - component: {fileID: 1944597821} + m_Layer: 0 + m_Name: MonsterSpawner (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1944597821 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1944597820} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b4587b3641b0d264cadb164f227e7b9f, type: 3} + m_Name: + m_EditorClassIdentifier: + monsterPrefab: {fileID: 1303357507213898, guid: de4fdabdbf5460e499dcbc3b6c56e49d, + type: 2} + motion: {x: -5, y: 0} + delay: 14 +--- !u!4 &1944597822 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1944597820} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 20.61, y: 1.94, z: -4.466797} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1955953756 GameObject: m_ObjectHideFlags: 0 @@ -124,6 +208,7 @@ GameObject: - component: {fileID: 1955953759} - component: {fileID: 1955953758} - component: {fileID: 1955953757} + - component: {fileID: 1955953761} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -194,3 +279,132 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1955953761 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1955953756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bcc11d7b3ddd16145b76361d71d5a250, type: 3} + m_Name: + m_EditorClassIdentifier: + background: {fileID: 2001262634} +--- !u!1 &1968402303 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1968402305} + - component: {fileID: 1968402304} + m_Layer: 0 + m_Name: MonsterSpawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1968402304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1968402303} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b4587b3641b0d264cadb164f227e7b9f, type: 3} + m_Name: + m_EditorClassIdentifier: + monsterPrefab: {fileID: 1303357507213898, guid: de4fdabdbf5460e499dcbc3b6c56e49d, + type: 2} + motion: {x: 5, y: 0} + delay: 5 +--- !u!4 &1968402305 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1968402303} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -22.38, y: -3.66, z: -4.466797} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2001262634 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2001262636} + - component: {fileID: 2001262635} + m_Layer: 0 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &2001262635 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2001262634} + 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: 792e2fed812630f4aaad38fc206f0d92, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 38.399998, y: 10.799999} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 +--- !u!4 &2001262636 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2001262634} + 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..840eda6 --- /dev/null +++ b/Assets/Scripts.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7e5d442e69a57e14aafcc6e5e803aaf0 +folderAsset: yes +timeCreated: 1523337580 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/CameraController.cs b/Assets/Scripts/CameraController.cs new file mode 100644 index 0000000..841efb7 --- /dev/null +++ b/Assets/Scripts/CameraController.cs @@ -0,0 +1,42 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class CameraController : MonoBehaviour { + public GameObject background; + float speed; + + void Awake() { + speed = 0.1f; + } + + void Update() { + ScrollSideways (); + } + + void ScrollSideways() { + //get the x & y of the mouse as a ratio + float mouseX = Input.mousePosition.x / Screen.width; + float mouseY = Input.mousePosition.y / Screen.height; + + //move the camera + Vector3 cameraPos = transform.position; + + if (mouseX < 0.20) { + cameraPos.x -= speed; + } + if (mouseX > 0.80) { + cameraPos.x += speed; + } + + //clamp + float bgWidth = background.GetComponent().bounds.extents.x; + float bgHeight = background.GetComponent().bounds.extents.y; + + transform.position = new Vector3 ( + Mathf.Clamp (cameraPos.x, background.transform.position.x - bgWidth/2, background.transform.position.x + bgWidth/2), + Mathf.Clamp (cameraPos.y, background.transform.position.y - bgHeight/2, background.transform.position.y + bgHeight/2), + transform.position.z + ); + } +} diff --git a/Assets/Scripts/CameraController.cs.meta b/Assets/Scripts/CameraController.cs.meta new file mode 100644 index 0000000..2842fd0 --- /dev/null +++ b/Assets/Scripts/CameraController.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: bcc11d7b3ddd16145b76361d71d5a250 +timeCreated: 1523337593 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/GameController.cs b/Assets/Scripts/GameController.cs new file mode 100644 index 0000000..30e644a --- /dev/null +++ b/Assets/Scripts/GameController.cs @@ -0,0 +1,11 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class GameController : MonoBehaviour { + void Update() { + if (Input.GetButtonDown ("Quit")) { + Application.Quit (); + } + } +} diff --git a/Assets/Scripts/GameController.cs.meta b/Assets/Scripts/GameController.cs.meta new file mode 100644 index 0000000..382d32d --- /dev/null +++ b/Assets/Scripts/GameController.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 18951b66066a27e469e4ff1a02456942 +timeCreated: 1523340110 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Monster.cs b/Assets/Scripts/Monster.cs new file mode 100644 index 0000000..01d4189 --- /dev/null +++ b/Assets/Scripts/Monster.cs @@ -0,0 +1,11 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Monster : MonoBehaviour { + void OnMouseOver() { + if (Input.GetMouseButtonDown(0)) { + Destroy (gameObject); + } + } +} diff --git a/Assets/Scripts/Monster.cs.meta b/Assets/Scripts/Monster.cs.meta new file mode 100644 index 0000000..684f4ac --- /dev/null +++ b/Assets/Scripts/Monster.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: eac2f64158454a043b4b2ed57afad7de +timeCreated: 1523340710 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/MonsterSpawner.cs b/Assets/Scripts/MonsterSpawner.cs new file mode 100644 index 0000000..9f55566 --- /dev/null +++ b/Assets/Scripts/MonsterSpawner.cs @@ -0,0 +1,22 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class MonsterSpawner : MonoBehaviour { + public GameObject monsterPrefab; + public Vector2 motion; + public float delay; + + void Awake() { + StartCoroutine (SpawnMonster ()); + } + + IEnumerator SpawnMonster() { + while(true) { + yield return new WaitForSeconds (delay); + GameObject monster = Instantiate (monsterPrefab); + monster.transform.position = transform.position; + monster.GetComponent ().velocity = motion; + } + } +} diff --git a/Assets/Scripts/MonsterSpawner.cs.meta b/Assets/Scripts/MonsterSpawner.cs.meta new file mode 100644 index 0000000..7401be6 --- /dev/null +++ b/Assets/Scripts/MonsterSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: b4587b3641b0d264cadb164f227e7b9f +timeCreated: 1523341235 +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..6eb482f --- /dev/null +++ b/Assets/Sprites.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 23a512817fc05e4479f2ebb3acc53b68 +folderAsset: yes +timeCreated: 1523340589 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/Slime.png b/Assets/Sprites/Slime.png new file mode 100644 index 0000000..461270f --- /dev/null +++ b/Assets/Sprites/Slime.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d2261648c9065102ffba63d82262a7dba0e7dd0d658999f77b50f1a526f5f6e +size 570 diff --git a/Assets/Sprites/Slime.png.meta b/Assets/Sprites/Slime.png.meta new file mode 100644 index 0000000..2771ce8 --- /dev/null +++ b/Assets/Sprites/Slime.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 8143d54795a231548b897c9b6f4e3da9 +timeCreated: 1523340589 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + 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: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + 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: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Working.meta b/Assets/Working.meta new file mode 100644 index 0000000..196f51b --- /dev/null +++ b/Assets/Working.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: bf4136072f2bbc9418e5f92e7417b039 +folderAsset: yes +timeCreated: 1523340589 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Working/Slime.xcf b/Assets/Working/Slime.xcf new file mode 100644 index 0000000..39d3e8b Binary files /dev/null and b/Assets/Working/Slime.xcf differ diff --git a/Assets/Working/Slime.xcf.meta b/Assets/Working/Slime.xcf.meta new file mode 100644 index 0000000..bc95b5a --- /dev/null +++ b/Assets/Working/Slime.xcf.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9ef350ebdc3b1734bac793990018e16a +timeCreated: 1523340589 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 74d7b53..9e432d1 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -35,6 +35,8 @@ GraphicsSettings: - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index 17c8f53..9ab9236 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -149,118 +149,6 @@ InputManager: type: 1 axis: 2 joyNum: 0 - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 0 - type: 2 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 1 - type: 2 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 0 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 1 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 2 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 3 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: return - altNegativeButton: - altPositiveButton: joystick button 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - serializedVersion: 3 m_Name: Submit descriptiveName: @@ -293,3 +181,19 @@ InputManager: type: 0 axis: 0 joyNum: 0 + - serializedVersion: 3 + m_Name: Quit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 1c92a78..ab8d889 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -41,3 +41,6 @@ TagManager: - name: Default uniqueID: 0 locked: 0 + - name: Entities + uniqueID: 2436466375 + locked: 0