diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..55b5d95 Binary files /dev/null and b/.DS_Store differ diff --git a/Assets/Scenes/Menu.unity b/Assets/Scenes/Menu.unity index e2c1dd7..f55145a 100644 --- a/Assets/Scenes/Menu.unity +++ b/Assets/Scenes/Menu.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.5615895, g: 0.72180885, b: 0.81785697, a: 1} + m_IndirectSpecularColor: {r: 0.5616698, g: 0.7218906, b: 0.81798315, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1397,7 +1397,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 601898925} - m_LocalRotation: {x: 0.045581307, y: -0.70516795, z: 0.045520626, w: 0.7061079} + m_LocalRotation: {x: 0.045581304, y: -0.70516795, z: 0.045520633, w: 0.7061079} m_LocalPosition: {x: 2.27, y: 4.16525, z: 3.82} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -1748,18 +1748,6 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: playbutton, Assembly-CSharp - m_MethodName: PlayButton - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - m_Target: {fileID: 871711472} m_TargetAssemblyTypeName: menumanager, Assembly-CSharp m_MethodName: UpdateCamera @@ -1785,18 +1773,6 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 - - m_Target: {fileID: 645543792} - m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine - m_MethodName: SetActive - m_Mode: 6 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 --- !u!114 &645543795 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2924,7 +2900,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 936985375} - m_LocalRotation: {x: 0.10193449, y: 0.69441885, z: -0.100375146, w: 0.7052068} + m_LocalRotation: {x: 0.10193449, y: 0.69441885, z: -0.10037514, w: 0.7052068} m_LocalPosition: {x: 4.61, y: 3.52, z: -1.96} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -4267,7 +4243,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1615993234} - m_LocalRotation: {x: 0.0010953943, y: 0.9979507, z: -0.06145683, w: 0.017787272} + m_LocalRotation: {x: 0.0010953955, y: 0.9979507, z: -0.061456837, w: 0.017787289} m_LocalPosition: {x: -0.435591, y: 4.16525, z: 13.428191} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -4953,7 +4929,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1895677325} - m_LocalRotation: {x: 0.0010953943, y: 0.9979507, z: -0.06145683, w: 0.017787272} + m_LocalRotation: {x: 0.0010953955, y: 0.9979507, z: -0.061456837, w: 0.017787289} m_LocalPosition: {x: -0.15911984, y: 2.9687777, z: -12.856641} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -14825,7 +14801,7 @@ Rigidbody: m_Mass: 1 m_Drag: 0 m_AngularDrag: 0 - m_UseGravity: 0 + m_UseGravity: 1 m_IsKinematic: 0 m_Interpolate: 0 m_Constraints: 112 @@ -14839,7 +14815,7 @@ CapsuleCollider: m_GameObject: {fileID: 7398140401948337837} m_Material: {fileID: 0} m_IsTrigger: 0 - m_Enabled: 0 + m_Enabled: 1 m_Radius: 1.7212968 m_Height: 6.3698125 m_Direction: 1 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/README.md b/README.md index 7c7a395..58e3b90 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,5 @@ A cél egy endless runner játék elkészítése Unityben C# használatával. Backend repo link: https://github.com/bance23/zarobackend.git + Frontend link: https://github.com/bance23/zarofrontend.git