From 29431fed595b876adcb587ea350649b0a077732e Mon Sep 17 00:00:00 2001 From: whiteplum20060329 Date: Fri, 9 Jan 2026 18:03:45 -0500 Subject: [PATCH 1/3] week 1 --- Assets/Scenes/script.meta | 8 ++ Assets/Scenes/script/Mover.cs | 41 +++++++++++ Assets/Scenes/script/Mover.cs.meta | 2 + Assets/Scenes/script/mousefollew.cs | 26 +++++++ Assets/Scenes/script/mousefollew.cs.meta | 2 + ProjectSettings/ProjectSettings.asset | 94 +++++++++++++++++++++++- 6 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 Assets/Scenes/script.meta create mode 100644 Assets/Scenes/script/Mover.cs create mode 100644 Assets/Scenes/script/Mover.cs.meta create mode 100644 Assets/Scenes/script/mousefollew.cs create mode 100644 Assets/Scenes/script/mousefollew.cs.meta diff --git a/Assets/Scenes/script.meta b/Assets/Scenes/script.meta new file mode 100644 index 00000000..460fe8d3 --- /dev/null +++ b/Assets/Scenes/script.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d5f6f4dd40ec51840a702b79bb8d5715 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/script/Mover.cs b/Assets/Scenes/script/Mover.cs new file mode 100644 index 00000000..41f2587c --- /dev/null +++ b/Assets/Scenes/script/Mover.cs @@ -0,0 +1,41 @@ +using UnityEngine; + +public class Mover : MonoBehaviour +{ + public float speed = 0.02f; + public float xMax; + public float Xmin; + public Camera gamecamera; + + + + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + + } + + // Update is called once per frame + void Update() + { + Vector3 moverXPos = transform.position; + moverXPos.x = moverXPos.x + speed ; + transform.position = moverXPos; + + Vector3 screenTransformPosition = gamecamera.WorldToScreenPoint(transform.position); + xMax = Screen.width; + + //set xMin to wherever is too far to the left for the player to see + Xmin = 0; + + if (screenTransformPosition.x>xMax) + { + speed = speed * -1 ; + + }else if (screenTransformPosition.x < Xmin) + { + speed = speed * -1; + } + + } +} diff --git a/Assets/Scenes/script/Mover.cs.meta b/Assets/Scenes/script/Mover.cs.meta new file mode 100644 index 00000000..cb96213c --- /dev/null +++ b/Assets/Scenes/script/Mover.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 473eec2b2cfab5c4fac109af42e4c04d \ No newline at end of file diff --git a/Assets/Scenes/script/mousefollew.cs b/Assets/Scenes/script/mousefollew.cs new file mode 100644 index 00000000..e50d2c8a --- /dev/null +++ b/Assets/Scenes/script/mousefollew.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using UnityEngine.InputSystem; + +public class mousefollow : MonoBehaviour +{ + public Camera gamecamera; + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + Vector3 currentMousePosition = Mouse.current.position.ReadValue(); + + Vector3 worldMousePositon = gamecamera.ScreenToWorldPoint(currentMousePosition); + worldMousePositon.z = 0; + transform.position = worldMousePositon; + + + + } +} diff --git a/Assets/Scenes/script/mousefollew.cs.meta b/Assets/Scenes/script/mousefollew.cs.meta new file mode 100644 index 00000000..8c72ba36 --- /dev/null +++ b/Assets/Scenes/script/mousefollew.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 551e859d751912046828c676c43e598b \ No newline at end of file diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 77543739..796716a0 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -292,7 +292,99 @@ PlayerSettings: AndroidReportGooglePlayAppDependencies: 1 androidSymbolsSizeThreshold: 800 m_BuildTargetIcons: [] - m_BuildTargetPlatformIcons: [] + m_BuildTargetPlatformIcons: + - m_BuildTarget: Android + m_Icons: + - m_Textures: [] + m_Width: 432 + m_Height: 432 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 324 + m_Height: 324 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 216 + m_Height: 216 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 162 + m_Height: 162 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 108 + m_Height: 108 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 81 + m_Height: 81 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 192 + m_Height: 192 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 144 + m_Height: 144 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 96 + m_Height: 96 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 72 + m_Height: 72 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 48 + m_Height: 48 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 36 + m_Height: 36 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 192 + m_Height: 192 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 144 + m_Height: 144 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 96 + m_Height: 96 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 72 + m_Height: 72 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 48 + m_Height: 48 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 36 + m_Height: 36 + m_Kind: 0 + m_SubKind: m_BuildTargetBatching: [] m_BuildTargetShaderSettings: [] m_BuildTargetGraphicsJobs: [] From e348da6185a65cdcefe30bafaae9ee19bf529166 Mon Sep 17 00:00:00 2001 From: whiteplum20060329 Date: Fri, 16 Jan 2026 17:06:33 -0500 Subject: [PATCH 2/3] week 2 --- Assets/Scenes/week2.unity | 218 ++++++++++++++++++ Assets/Scenes/week2.unity.meta | 7 + Assets/{Scenes => }/script.meta | 0 Assets/{Scenes => }/script/Mover.cs | 2 +- Assets/{Scenes => }/script/Mover.cs.meta | 0 Assets/script/hider.cs | 39 ++++ Assets/script/hider.cs.meta | 2 + Assets/script/missile.cs | 27 +++ Assets/script/missile.cs.meta | 2 + Assets/{Scenes => }/script/mousefollew.cs | 0 .../{Scenes => }/script/mousefollew.cs.meta | 0 Assets/script/pulser.cs | 33 +++ Assets/script/pulser.cs.meta | 2 + 13 files changed, 331 insertions(+), 1 deletion(-) create mode 100644 Assets/Scenes/week2.unity create mode 100644 Assets/Scenes/week2.unity.meta rename Assets/{Scenes => }/script.meta (100%) rename Assets/{Scenes => }/script/Mover.cs (93%) rename Assets/{Scenes => }/script/Mover.cs.meta (100%) create mode 100644 Assets/script/hider.cs create mode 100644 Assets/script/hider.cs.meta create mode 100644 Assets/script/missile.cs create mode 100644 Assets/script/missile.cs.meta rename Assets/{Scenes => }/script/mousefollew.cs (100%) rename Assets/{Scenes => }/script/mousefollew.cs.meta (100%) create mode 100644 Assets/script/pulser.cs create mode 100644 Assets/script/pulser.cs.meta diff --git a/Assets/Scenes/week2.unity b/Assets/Scenes/week2.unity new file mode 100644 index 00000000..fc1ca3b1 --- /dev/null +++ b/Assets/Scenes/week2.unity @@ -0,0 +1,218 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 10 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 1 + m_PVRFilteringGaussRadiusAO: 1 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &1757837775 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1757837778} + - component: {fileID: 1757837777} + - component: {fileID: 1757837776} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1757837776 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1757837775} + m_Enabled: 1 +--- !u!20 &1757837777 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1757837775} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1757837778 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1757837775} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1757837778} diff --git a/Assets/Scenes/week2.unity.meta b/Assets/Scenes/week2.unity.meta new file mode 100644 index 00000000..18c6388b --- /dev/null +++ b/Assets/Scenes/week2.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8385e9f6195bc6140bdafe0e26b6da04 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/script.meta b/Assets/script.meta similarity index 100% rename from Assets/Scenes/script.meta rename to Assets/script.meta diff --git a/Assets/Scenes/script/Mover.cs b/Assets/script/Mover.cs similarity index 93% rename from Assets/Scenes/script/Mover.cs rename to Assets/script/Mover.cs index 41f2587c..d89f679e 100644 --- a/Assets/Scenes/script/Mover.cs +++ b/Assets/script/Mover.cs @@ -19,7 +19,7 @@ void Start() void Update() { Vector3 moverXPos = transform.position; - moverXPos.x = moverXPos.x + speed ; + moverXPos.x = moverXPos.x + speed * Time.deltaTime ; transform.position = moverXPos; Vector3 screenTransformPosition = gamecamera.WorldToScreenPoint(transform.position); diff --git a/Assets/Scenes/script/Mover.cs.meta b/Assets/script/Mover.cs.meta similarity index 100% rename from Assets/Scenes/script/Mover.cs.meta rename to Assets/script/Mover.cs.meta diff --git a/Assets/script/hider.cs b/Assets/script/hider.cs new file mode 100644 index 00000000..2a6943cf --- /dev/null +++ b/Assets/script/hider.cs @@ -0,0 +1,39 @@ +using UnityEngine; +using UnityEngine.InputSystem; + +public class hider : MonoBehaviour +{ + public Vector3 hidePosition; + public float hideDistance; + public Camera gameCamera; + + public float waitDuration; + + private float timePassed = 0f; + + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + + } + + // Update is called once per frame + void Update() + { + //Vector3 currentMousePosition = Mouse.current.position.ReadValue(); + //Vector3 worldMousePosition = gameCamera.ScreenToWorldPoint(currentMousePosition); + //worldMousePosition.z = 0f; + + //float distanceToMouse=Vector3.Distance(currentMousePosition, transform.position); + + //if (distanceToMouse < hideDistance) + //{ + // transform.position = hidePosition; + //} + timePassed += Time.deltaTime; + if (timePassed > waitDuration)//i am little bit confused ABOut this part + { + transform.position = hidePosition; + } + } +} diff --git a/Assets/script/hider.cs.meta b/Assets/script/hider.cs.meta new file mode 100644 index 00000000..46ee8616 --- /dev/null +++ b/Assets/script/hider.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 34dfeac388ad56f43b24c416f26d1536 \ No newline at end of file diff --git a/Assets/script/missile.cs b/Assets/script/missile.cs new file mode 100644 index 00000000..c94d5fff --- /dev/null +++ b/Assets/script/missile.cs @@ -0,0 +1,27 @@ + +using UnityEngine; + +public class missile : MonoBehaviour +{ + public Transform startValue ; + public Transform endValue; + public float progress ; + public Vector3 output ; + + public float duration; + + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + + } + + // Update is called once per frame + void Update() + { + progress += Time.deltaTime / duration; + output = Vector3.Lerp(startValue.position, endValue.position, progress); + transform.position = output; + + } +} diff --git a/Assets/script/missile.cs.meta b/Assets/script/missile.cs.meta new file mode 100644 index 00000000..c5a7f166 --- /dev/null +++ b/Assets/script/missile.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: de6217ef1f6fa3541a7fa54c675a27ac \ No newline at end of file diff --git a/Assets/Scenes/script/mousefollew.cs b/Assets/script/mousefollew.cs similarity index 100% rename from Assets/Scenes/script/mousefollew.cs rename to Assets/script/mousefollew.cs diff --git a/Assets/Scenes/script/mousefollew.cs.meta b/Assets/script/mousefollew.cs.meta similarity index 100% rename from Assets/Scenes/script/mousefollew.cs.meta rename to Assets/script/mousefollew.cs.meta diff --git a/Assets/script/pulser.cs b/Assets/script/pulser.cs new file mode 100644 index 00000000..7b974adc --- /dev/null +++ b/Assets/script/pulser.cs @@ -0,0 +1,33 @@ +using UnityEngine; + +public class pulser : MonoBehaviour +{ + public AnimationCurve curve; + public float duration; + public float output; + + private float progress = 0; + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + + } + + // Update is called once per frame + void Update() + { + progress += Time.deltaTime / duration; + output = curve .Evaluate(progress); + + + + + transform.localScale = Vector3.one * output; + + if (progress> 1f) + { + progress = 0f; + } + + } +} diff --git a/Assets/script/pulser.cs.meta b/Assets/script/pulser.cs.meta new file mode 100644 index 00000000..c042fde9 --- /dev/null +++ b/Assets/script/pulser.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 151bb655aa6e3d147ac7c68dbc3c4b9e \ No newline at end of file From cd17e0e985ffee81a9ae9c156ad0ce5669361f72 Mon Sep 17 00:00:00 2001 From: whiteplum20060329 Date: Fri, 16 Jan 2026 17:52:32 -0500 Subject: [PATCH 3/3] game gym --- Assets/script/duckmove.cs | 42 ++++++++++++++++++++++++++++++++++ Assets/script/duckmove.cs.meta | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 Assets/script/duckmove.cs create mode 100644 Assets/script/duckmove.cs.meta diff --git a/Assets/script/duckmove.cs b/Assets/script/duckmove.cs new file mode 100644 index 00000000..e79ae281 --- /dev/null +++ b/Assets/script/duckmove.cs @@ -0,0 +1,42 @@ +using UnityEngine; + +public class duckmove : MonoBehaviour +{ + public Vector3 speed ; + public Camera gamecamera; + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + +} + + // Update is called once per frame + void Update() + { + Vector3 mover = transform.position; + mover= mover+ speed * Time.deltaTime; + transform.position = mover; + + Vector3 screenTransformPosition = gamecamera.WorldToScreenPoint(transform.position); + + if (screenTransformPosition.x > Screen.width) + { + speed.x *= -1; + + } + if (screenTransformPosition.x < 0) + { + speed.x *= -1; + } + if (screenTransformPosition.y > Screen.height) + { + speed.y *= -1; + + + } + if (screenTransformPosition.y < 0) + { + speed.y *= -1; + } + } +} diff --git a/Assets/script/duckmove.cs.meta b/Assets/script/duckmove.cs.meta new file mode 100644 index 00000000..ceb82f85 --- /dev/null +++ b/Assets/script/duckmove.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a5b63fd476524b548afd1e8593fb562d \ No newline at end of file