From 12735a14eea18dd5bac5a37df0c7edcd9375e712 Mon Sep 17 00:00:00 2001 From: DominikB Date: Sun, 25 Jun 2023 11:21:42 +0200 Subject: [PATCH] Frank glitched nicht in Boden --- .../Frank/FrankAnimator.controller | 8 +- .../Frank/FrankDimShift.anim | 8 +- Assets/AssetsFORELLE/Script/FadingPlatform.cs | 3 +- Assets/AssetsFORELLE/Script/respawn.cs | 9 ++ .../SpriteSheets/FrankDimChangeRdy.png.meta | 50 +++++++++- .../bröckelige platform gletscher.png.meta | 94 ++++++++++++++++++- .../ScenesInGame/2PlatzhalterTutorial.unity | 4 + Assets/Scenes/ScenesInGame/5.1Tutorial.unity | 12 ++- 8 files changed, 171 insertions(+), 17 deletions(-) diff --git a/Assets/AssetsFORELLE/AnimationsAndAnimators/Frank/FrankAnimator.controller b/Assets/AssetsFORELLE/AnimationsAndAnimators/Frank/FrankAnimator.controller index 4eed1ab..8c45f23 100644 --- a/Assets/AssetsFORELLE/AnimationsAndAnimators/Frank/FrankAnimator.controller +++ b/Assets/AssetsFORELLE/AnimationsAndAnimators/Frank/FrankAnimator.controller @@ -500,25 +500,25 @@ AnimatorController: m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: ShiftsDim m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: IsPushing m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: IsFalling m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer diff --git a/Assets/AssetsFORELLE/AnimationsAndAnimators/Frank/FrankDimShift.anim b/Assets/AssetsFORELLE/AnimationsAndAnimators/Frank/FrankDimShift.anim index 6f689e8..f458482 100644 --- a/Assets/AssetsFORELLE/AnimationsAndAnimators/Frank/FrankDimShift.anim +++ b/Assets/AssetsFORELLE/AnimationsAndAnimators/Frank/FrankDimShift.anim @@ -20,9 +20,9 @@ AnimationClip: m_PPtrCurves: - curve: - time: 0 - value: {fileID: 1969513919, guid: 1455a3c98fe793a4782adb5e07c09200, type: 3} + value: {fileID: 2084159977, guid: 1a0ce0cac5566cc41a932ff938702a4b, type: 3} - time: 0.05 - value: {fileID: 876503906, guid: 1455a3c98fe793a4782adb5e07c09200, type: 3} + value: {fileID: -1022003792, guid: 1a0ce0cac5566cc41a932ff938702a4b, type: 3} attribute: m_Sprite path: classID: 212 @@ -42,8 +42,8 @@ AnimationClip: customType: 23 isPPtrCurve: 1 pptrCurveMapping: - - {fileID: 1969513919, guid: 1455a3c98fe793a4782adb5e07c09200, type: 3} - - {fileID: 876503906, guid: 1455a3c98fe793a4782adb5e07c09200, type: 3} + - {fileID: 2084159977, guid: 1a0ce0cac5566cc41a932ff938702a4b, type: 3} + - {fileID: -1022003792, guid: 1a0ce0cac5566cc41a932ff938702a4b, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} diff --git a/Assets/AssetsFORELLE/Script/FadingPlatform.cs b/Assets/AssetsFORELLE/Script/FadingPlatform.cs index fe6b07d..48b6e6e 100644 --- a/Assets/AssetsFORELLE/Script/FadingPlatform.cs +++ b/Assets/AssetsFORELLE/Script/FadingPlatform.cs @@ -49,12 +49,13 @@ public AudioClip fadeSound; // The sound clip to be played edge.enabled = true; gone = false; } else { + audioSource.PlayOneShot(fadeSound); yield return new WaitForSeconds (fadeTime); spriteRenderer.enabled = false; col.enabled = false; edge.enabled = false; gone = true; - audioSource.PlayOneShot(fadeSound); + } } diff --git a/Assets/AssetsFORELLE/Script/respawn.cs b/Assets/AssetsFORELLE/Script/respawn.cs index 0989b7d..395cfac 100644 --- a/Assets/AssetsFORELLE/Script/respawn.cs +++ b/Assets/AssetsFORELLE/Script/respawn.cs @@ -1,14 +1,18 @@ using UnityEngine; +using System; public class respawn : MonoBehaviour { private GameObject player; [SerializeField] private Transform respawnPoint; + private AudioSource audioSource; // Reference to the AudioSource component + public AudioClip hurtSound; // The sound clip to be played void Start() { player = GameObject.Find("Frank"); + audioSource = GetComponent(); } @@ -20,6 +24,11 @@ public class respawn : MonoBehaviour { if (other.gameObject.CompareTag("Player")) { + try{ + audioSource.PlayOneShot(hurtSound);} + catch(Exception e){ + ; + } player.transform.position = respawnPoint.position; Debug.Log("Respawn: Move"); } diff --git a/Assets/AssetsFORELLE/SpriteSheets/FrankDimChangeRdy.png.meta b/Assets/AssetsFORELLE/SpriteSheets/FrankDimChangeRdy.png.meta index 14c849b..3bd4c24 100644 --- a/Assets/AssetsFORELLE/SpriteSheets/FrankDimChangeRdy.png.meta +++ b/Assets/AssetsFORELLE/SpriteSheets/FrankDimChangeRdy.png.meta @@ -42,7 +42,7 @@ TextureImporter: nPOTScale: 0 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 2 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 @@ -115,7 +115,49 @@ TextureImporter: forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: FrankDimChangeRdy_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 48 + alignment: 9 + pivot: {x: 0.5, y: 0.29} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: ec92c4cdfe5aa4af2bc4a3fe2ec6a72d + internalID: 2084159977 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: FrankDimChangeRdy_1 + rect: + serializedVersion: 2 + x: 32 + y: 0 + width: 32 + height: 48 + alignment: 9 + pivot: {x: 0.5, y: 0.29} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 3a3a93ee3d0ae4b24a7490f90909c921 + internalID: -1022003792 + vertices: [] + indices: + edges: [] + weights: [] outline: [] physicsShape: [] bones: [] @@ -126,7 +168,9 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - nameFileIdTable: {} + nameFileIdTable: + FrankDimChangeRdy_0: 2084159977 + FrankDimChangeRdy_1: -1022003792 spritePackingTag: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 diff --git a/Assets/AssetsFORELLE/Sprites/Tilesets/bröckelige platform gletscher.png.meta b/Assets/AssetsFORELLE/Sprites/Tilesets/bröckelige platform gletscher.png.meta index 1342b24..efb9043 100644 --- a/Assets/AssetsFORELLE/Sprites/Tilesets/bröckelige platform gletscher.png.meta +++ b/Assets/AssetsFORELLE/Sprites/Tilesets/bröckelige platform gletscher.png.meta @@ -42,7 +42,7 @@ TextureImporter: nPOTScale: 0 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 2 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 @@ -103,7 +103,91 @@ TextureImporter: forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: "br\xF6ckelige platform gletscher_0" + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 24 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: bcc0034249c4340ff8df51cebadb8a12 + internalID: -54090501 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "br\xF6ckelige platform gletscher_1" + rect: + serializedVersion: 2 + x: 24 + y: 0 + width: 24 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: c8f52eb4a835a4f5f836367fb9557e3e + internalID: -12048442 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "br\xF6ckelige platform gletscher_2" + rect: + serializedVersion: 2 + x: 48 + y: 0 + width: 24 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: d2ed915c7c3aa4187bafe97b152f2b20 + internalID: -142356772 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "br\xF6ckelige platform gletscher_3" + rect: + serializedVersion: 2 + x: 72 + y: 0 + width: 24 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: ab45fa781883b472496cae22fea3f942 + internalID: 535485192 + vertices: [] + indices: + edges: [] + weights: [] outline: [] physicsShape: [] bones: [] @@ -114,7 +198,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - nameFileIdTable: {} + nameFileIdTable: + "br\xF6ckelige platform gletscher_0": -54090501 + "br\xF6ckelige platform gletscher_1": -12048442 + "br\xF6ckelige platform gletscher_2": -142356772 + "br\xF6ckelige platform gletscher_3": 535485192 spritePackingTag: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 diff --git a/Assets/Scenes/ScenesInGame/2PlatzhalterTutorial.unity b/Assets/Scenes/ScenesInGame/2PlatzhalterTutorial.unity index e5e7d64..bb651b1 100644 --- a/Assets/Scenes/ScenesInGame/2PlatzhalterTutorial.unity +++ b/Assets/Scenes/ScenesInGame/2PlatzhalterTutorial.unity @@ -154,6 +154,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: respawnPoint: {fileID: 71726988} + hurtSound: {fileID: 0} --- !u!61 &32937241 BoxCollider2D: m_ObjectHideFlags: 0 @@ -1373,6 +1374,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: respawnPoint: {fileID: 2046905599} + hurtSound: {fileID: 8300000, guid: 16f3d8f25ca3c494bb6b69278a399379, type: 3} --- !u!61 &648447528 BoxCollider2D: m_ObjectHideFlags: 0 @@ -3318,6 +3320,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: respawnPoint: {fileID: 548313697} + hurtSound: {fileID: 8300000, guid: 16f3d8f25ca3c494bb6b69278a399379, type: 3} --- !u!61 &747507368 BoxCollider2D: m_ObjectHideFlags: 0 @@ -3390,6 +3393,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: respawnPoint: {fileID: 465821332} + hurtSound: {fileID: 8300000, guid: 16f3d8f25ca3c494bb6b69278a399379, type: 3} --- !u!61 &782810835 BoxCollider2D: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/ScenesInGame/5.1Tutorial.unity b/Assets/Scenes/ScenesInGame/5.1Tutorial.unity index a0d9c50..eb6c5c1 100644 --- a/Assets/Scenes/ScenesInGame/5.1Tutorial.unity +++ b/Assets/Scenes/ScenesInGame/5.1Tutorial.unity @@ -1021,6 +1021,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1428104201} m_Modifications: + - target: {fileID: 2410396854066836737, guid: 22badd0525f460b4d988841429f6a07e, type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} - target: {fileID: 2410396854066836738, guid: 22badd0525f460b4d988841429f6a07e, type: 3} propertyPath: m_Name value: Frank @@ -1029,6 +1033,10 @@ PrefabInstance: propertyPath: mainCamera value: objectReference: {fileID: 274119764} + - target: {fileID: 2410396854066836741, guid: 22badd0525f460b4d988841429f6a07e, type: 3} + propertyPath: m_FlipX + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2410396854066836746, guid: 22badd0525f460b4d988841429f6a07e, type: 3} propertyPath: m_RootOrder value: 1 @@ -1039,11 +1047,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2410396854066836746, guid: 22badd0525f460b4d988841429f6a07e, type: 3} propertyPath: m_LocalPosition.y - value: -3.4722967 + value: -3.43 objectReference: {fileID: 0} - target: {fileID: 2410396854066836746, guid: 22badd0525f460b4d988841429f6a07e, type: 3} propertyPath: m_LocalPosition.z - value: -0.32736072 + value: -0.3273607 objectReference: {fileID: 0} - target: {fileID: 2410396854066836746, guid: 22badd0525f460b4d988841429f6a07e, type: 3} propertyPath: m_LocalRotation.w