diff --git a/Assets/Scripts/Targyak.cs b/Assets/Scripts/Targyak.cs new file mode 100644 index 0000000..7ad4bfe --- /dev/null +++ b/Assets/Scripts/Targyak.cs @@ -0,0 +1,46 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class Targyak : MonoBehaviour +{ + int fsz_elerheto = 1; //ennyi darab fenséges szárny tárgya van a játékosnak + + public GameObject bobby; //a karakter akit mozgatunk + + public Transform targetFent; //a fenti pont ahova felrepül + + public Transform targetLent; //a lenti pont ahol alapból fut + + public float speed; //a sebesség amivel felrepül + + + private void FensegesSzarnyak() + { + + if (fsz_elerheto > 0) //ha van legalább 1 ilyen tárgya + { + Vector3 a = transform.position; + + Vector3 b = targetFent.position; + + Vector3 c = targetLent.position; + + bobby.transform.position = Vector3.MoveTowards(a, b, speed); //itt felrepül + + TimerSzarnyak(); //eddig repülsz + + bobby.transform.position = Vector3.MoveTowards(a, c, speed); //itt pedig visszaérkezik a földre + + + + } + + } + + IEnumerator TimerSzarnyak() + { + yield return new WaitForSecondsRealtime(5); //vár 5 másodpercet + } +} diff --git a/Assets/Scripts/Targyak.cs.meta b/Assets/Scripts/Targyak.cs.meta new file mode 100644 index 0000000..d6a8bff --- /dev/null +++ b/Assets/Scripts/Targyak.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: af7cebaa4cf844a54a550572d1f9be69 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt index cca19f4..f5bd95d 100644 --- a/UserSettings/Layouts/default-2021.dwlt +++ b/UserSettings/Layouts/default-2021.dwlt @@ -15,9 +15,15 @@ MonoBehaviour: m_PixelRect: serializedVersion: 2 x: 0 +<<<<<<< Updated upstream y: 28 width: 1366 height: 673 +======= + y: 65 + width: 1470 + height: 809 +>>>>>>> Stashed changes m_ShowMode: 4 m_Title: Simulator m_RootView: {fileID: 7} @@ -39,10 +45,17 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 +<<<<<<< Updated upstream x: 689 y: 0 width: 295 height: 389 +======= + x: 587.5 + y: 0 + width: 535 + height: 627.5 +>>>>>>> Stashed changes m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 13} @@ -69,12 +82,21 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 30 +<<<<<<< Updated upstream width: 1366 height: 623 m_MinSize: {x: 400, y: 200} m_MaxSize: {x: 32384, y: 16192} vertical: 0 controlID: 25 +======= + width: 1470 + height: 759 + m_MinSize: {x: 400, y: 200} + m_MaxSize: {x: 32384, y: 16192} + vertical: 0 + controlID: 72 +>>>>>>> Stashed changes --- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 @@ -90,10 +112,17 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 +<<<<<<< Updated upstream x: 984 y: 0 width: 382 height: 623 +======= + x: 1122.5 + y: 0 + width: 347.5 + height: 759 +>>>>>>> Stashed changes m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 15} @@ -118,8 +147,13 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 +<<<<<<< Updated upstream width: 161 height: 389 +======= + width: 205 + height: 627.5 +>>>>>>> Stashed changes m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 16} @@ -143,9 +177,15 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 +<<<<<<< Updated upstream y: 389 width: 984 height: 234 +======= + y: 627.5 + width: 1122.5 + height: 131.5 +>>>>>>> Stashed changes m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} m_ActualView: {fileID: 14} @@ -174,8 +214,13 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 +<<<<<<< Updated upstream width: 1366 height: 673 +======= + width: 1470 + height: 809 +>>>>>>> Stashed changes m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 @@ -199,7 +244,11 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 +<<<<<<< Updated upstream width: 1366 +======= + width: 1470 +>>>>>>> Stashed changes height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -220,8 +269,13 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 +<<<<<<< Updated upstream y: 653 width: 1366 +======= + y: 789 + width: 1470 +>>>>>>> Stashed changes height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -244,12 +298,21 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 +<<<<<<< Updated upstream width: 984 height: 623 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 1 controlID: 26 +======= + width: 1122.5 + height: 759 + m_MinSize: {x: 300, y: 200} + m_MaxSize: {x: 24288, y: 16192} + vertical: 1 + controlID: 73 +>>>>>>> Stashed changes --- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 @@ -270,12 +333,21 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 +<<<<<<< Updated upstream width: 984 height: 389 m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 8096} vertical: 0 controlID: 27 +======= + width: 1122.5 + height: 627.5 + m_MinSize: {x: 300, y: 100} + m_MaxSize: {x: 24288, y: 8096} + vertical: 0 + controlID: 74 +>>>>>>> Stashed changes --- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 @@ -291,10 +363,17 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 +<<<<<<< Updated upstream x: 161 y: 0 width: 528 height: 389 +======= + x: 205 + y: 0 + width: 382.5 + height: 627.5 +>>>>>>> Stashed changes m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 17} @@ -322,10 +401,17 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 +<<<<<<< Updated upstream x: 689 y: 86 width: 293 height: 368 +======= + x: 587.5 + y: 95 + width: 533 + height: 606.5 +>>>>>>> Stashed changes m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -354,7 +440,11 @@ MonoBehaviour: - UnityEditor.DeviceSimulation.ApplicationSettingsPlugin pluginStates: - '{}' +<<<<<<< Updated upstream scale: 13 +======= + scale: 22 +>>>>>>> Stashed changes fitToScreenEnabled: 1 rotationDegree: 0 highlightSafeAreaEnabled: 0 @@ -382,9 +472,15 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 +<<<<<<< Updated upstream y: 475 width: 983 height: 213 +======= + y: 722.5 + width: 1121.5 + height: 110.5 +>>>>>>> Stashed changes m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -408,6 +504,7 @@ MonoBehaviour: m_ViewMode: 1 m_StartGridSize: 53 m_LastFolders: +<<<<<<< Updated upstream - Assets m_LastFoldersGridSize: 53 m_LastProjectPath: /home/tom/Documents/dev/zarodolgozat/ColorRunner @@ -418,6 +515,18 @@ MonoBehaviour: m_SelectedIDs: b05f0000 m_LastClickedID: 24496 m_ExpandedIDs: 00000000b05f000000ca9a3b +======= + - Assets/Scripts + m_LastFoldersGridSize: 78 + m_LastProjectPath: /Users/bance/Documents/GitHub/PuzzleColorBall + m_LockTracker: + m_IsLocked: 0 + m_FolderTreeState: + scrollPos: {x: 0, y: 117.5} + m_SelectedIDs: 766c0000 + m_LastClickedID: 27766 + m_ExpandedIDs: 000000005e6c0000606c0000626c0000646c0000666c000000ca9a3bffffff7f +>>>>>>> Stashed changes m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -445,7 +554,11 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 +<<<<<<< Updated upstream m_ExpandedIDs: 00000000b05f0000 +======= + m_ExpandedIDs: 000000005e6c0000606c0000626c0000646c0000666c0000 +>>>>>>> Stashed changes m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -517,14 +630,21 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Inspector - m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -440750813802333266, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 +<<<<<<< Updated upstream x: 984 y: 86 width: 381 height: 602 +======= + x: 1122.5 + y: 95 + width: 346.5 + height: 738 +>>>>>>> Stashed changes m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -563,9 +683,15 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 +<<<<<<< Updated upstream y: 86 width: 160 height: 368 +======= + y: 95 + width: 204 + height: 606.5 +>>>>>>> Stashed changes m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -575,7 +701,11 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 +<<<<<<< Updated upstream m_ExpandedIDs: 06fbffff +======= + m_ExpandedIDs: 18fbffff +>>>>>>> Stashed changes m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -619,10 +749,17 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 +<<<<<<< Updated upstream x: 161 y: 86 width: 526 height: 368 +======= + x: 205 + y: 95 + width: 380.5 + height: 606.5 +>>>>>>> Stashed changes m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -632,8 +769,8 @@ MonoBehaviour: floating: 0 collapsed: 0 displayed: 1 - snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: -101, y: -26} + snapOffset: {x: -101, y: -26} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 3 id: Tool Settings index: 0 @@ -857,9 +994,15 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: +<<<<<<< Updated upstream m_Target: {x: 18.005922, y: 25.929068, z: 27.950302} speed: 2 m_Value: {x: 18.005922, y: 25.929068, z: 27.950302} +======= + m_Target: {x: 1.0256333, y: -3.2673082, z: 28.326492} + speed: 2 + m_Value: {x: 1.0256333, y: -3.2673082, z: 28.326492} +>>>>>>> Stashed changes m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -898,7 +1041,7 @@ MonoBehaviour: m_Fade: m_Target: 0 speed: 2 - m_Value: 1 + m_Value: 0 m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} m_Pivot: {x: 0, y: 0, z: 0} m_Size: {x: 1, y: 1} @@ -906,6 +1049,7 @@ MonoBehaviour: m_GridAxis: 1 m_gridOpacity: 0.5 m_Rotation: +<<<<<<< Updated upstream m_Target: {x: -0.20447084, y: 0.33339912, z: -0.07431277, w: -0.91734326} speed: 2 m_Value: {x: -0.20171747, y: 0.33361983, z: -0.073312074, w: -0.9179506} @@ -913,6 +1057,15 @@ MonoBehaviour: m_Target: 27.383923 speed: 2 m_Value: 27.383923 +======= + m_Target: {x: 0.3619547, y: 0.0447086, z: -0.017387895, w: 0.9309531} + speed: 2 + m_Value: {x: -0.3619547, y: -0.0447086, z: 0.017387895, w: -0.93095315} + m_Size: + m_Target: 5.786533 + speed: 2 + m_Value: 5.786533 +>>>>>>> Stashed changes m_Ortho: m_Target: 0 speed: 2 @@ -930,7 +1083,11 @@ MonoBehaviour: m_FarClip: 10000 m_DynamicClip: 1 m_OcclusionCulling: 0 +<<<<<<< Updated upstream m_LastSceneViewRotation: {x: -0.18727255, y: 0.45572704, z: -0.09871261, w: -0.8645814} +======= + m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} +>>>>>>> Stashed changes m_LastSceneViewOrtho: 0 m_ReplacementShader: {fileID: 0} m_ReplacementString: