]> git.lizzy.rs Git - SuperMouseAdventure.git/commitdiff
Improved Audio and improved dust effect
authorKG0104 <76601263+KG0104@users.noreply.github.com>
Fri, 24 Sep 2021 16:14:15 +0000 (18:14 +0200)
committerKG0104 <76601263+KG0104@users.noreply.github.com>
Fri, 24 Sep 2021 16:14:15 +0000 (18:14 +0200)
2DGame/Assets/Scenes/(1) Green_Idyll/green_idyll_10.unity
2DGame/Assets/Scripts/Audio/AudioManager.cs
2DGame/Assets/Scripts/Audio/LandingSound.cs
2DGame/Assets/Scripts/Dialogue/BossDialogue.cs
2DGame/Assets/Scripts/Dialogue/BossDialogueTrigger.cs
2DGame/Assets/Scripts/Mouse/MouseController.cs
2DGame/Assets/Sprites/enemyDust.png.meta

index d5ebdcddbce5e08502c54854912a59298ac4f2e8..ff36625a0f476d8c5709083c7ea09433e48b34c2 100644 (file)
@@ -2471,6 +2471,7 @@ MonoBehaviour:
     volume: 0.2
     pitch: 1
     source: {fileID: 0}
+  music: flowers
 --- !u!4 &292106544
 Transform:
   m_ObjectHideFlags: 0
@@ -6670,7 +6671,7 @@ ParticleSystem:
       serializedVersion: 2
       minMaxState: 3
       scalar: 2
-      minScalar: 0.5
+      minScalar: 0.0001
       maxCurve:
         serializedVersion: 2
         m_Curve:
@@ -6776,7 +6777,7 @@ ParticleSystem:
       serializedVersion: 2
       minMaxState: 2
       minColor: {r: 1, g: 1, b: 1, a: 1}
-      maxColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+      maxColor: {r: 1, g: 1, b: 1, a: 1}
       maxGradient:
         serializedVersion: 2
         key0: {r: 1, g: 1, b: 1, a: 1}
@@ -7915,8 +7916,8 @@ ParticleSystem:
         m_NumAlphaKeys: 2
   UVModule:
     serializedVersion: 2
-    enabled: 0
-    mode: 0
+    enabled: 1
+    mode: 1
     timeMode: 0
     fps: 30
     frameOverTime:
@@ -8034,7 +8035,7 @@ ParticleSystem:
     uvChannelMask: -1
     rowMode: 1
     sprites:
-    - sprite: {fileID: 0}
+    - sprite: {fileID: 21300000, guid: 03f24adbe4a503442b480da2cb2e4285, type: 3}
     flipU: 0
     flipV: 0
   VelocityModule:
@@ -12853,7 +12854,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   speed: 36
-  jumpForce: 54
+  jumpForce: 50
   jumptime: 0.5
   isGrounded: 0
   groundcheck: {fileID: 972365582}
index a91169d2e678484a7ed6ee14cb4511d8d0e08740..3092af2bc8b20fb90a0b519e66d21b5c69f43f2a 100644 (file)
@@ -5,22 +5,10 @@ using UnityEngine;
 public class AudioManager : MonoBehaviour
 {
     public Sound[] sounds;
-    public static AudioManager instance;
+    public string music;
 
     void Awake()
     {
-        if (instance == null)
-        {
-            instance = this;
-        }
-        else
-        {
-            Destroy(gameObject);
-            return;
-        }
-
-        DontDestroyOnLoad(gameObject);
-
         foreach (Sound s in sounds)
         {
             s.source = gameObject.AddComponent<AudioSource>();
@@ -31,15 +19,20 @@ public class AudioManager : MonoBehaviour
         }
     }
 
+    void Start()
+    {
+        FindObjectOfType<AudioManager>().Play(music);
+    }
+
     public void Play(string name)
     {
         Sound s = Array.Find(sounds, sound => sound.name == name);
         s.source.Play();
     }
 
-    public void Stop(string sound)
+    public void Stop(string name)
     {
-        Sound s = Array.Find(sounds, item => item.name == sound);
+        Sound s = Array.Find(sounds, sound => sound.name == name);
         s.source.Stop();
     }
 }
\ No newline at end of file
index 305b9114f5d84d4d3f6abcbe4c5abfa7b74ab196..866abf7f9136913a6ea69d069738a6ad8915e8c6 100644 (file)
@@ -15,7 +15,8 @@ public class LandingSound : MonoBehaviour
         if(collision.gameObject.CompareTag("Player"))
         {
             FindObjectOfType<AudioManager>().Play("landung");
-            Instantiate(dustEffect, groundCheck.transform.position, Quaternion.identity);
+            Vector3 spawnPos = new Vector3(groundCheck.transform.position.x, groundCheck.transform.position.y + 1, groundCheck.transform.position.z);
+            Instantiate(dustEffect, spawnPos, Quaternion.identity);
         }
     }
 }
index 6232b21716154a854591ea63039a59b94bcb2c27..7968672e3e4dd2a836795661e03c6a6b2fe1f2af 100644 (file)
@@ -75,6 +75,7 @@ public class BossDialogue : MonoBehaviour
             boss.bossfight = true;
             mouse.GetComponent<Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeRotation;
             mouse.GetComponent<MouseController>().enabled = true;
+            FindObjectOfType<AudioManager>().Play("snail_fight");
         }
     }
 }
index d26c69001551e7c741a10f8bab1447bf3381ca66..ff8099e06296a693c281cf672825aed5022c337c 100644 (file)
@@ -23,7 +23,6 @@ public class BossDialogueTrigger : MonoBehaviour
             collision.gameObject.GetComponent<MouseController>().enabled = false;
             GetComponent<BoxCollider2D>().enabled = false;
             FindObjectOfType<AudioManager>().Stop("flowers");
-            FindObjectOfType<AudioManager>().Play("snail_fight");
         }
     }
 }
\ No newline at end of file
index 060e814abcb6004213d3699247ef0d272ff639db..cefb6ea479c40052b0af9af7d9afa62db4a0cd47 100644 (file)
@@ -39,8 +39,6 @@ public class MouseController : MonoBehaviour
         rb = GetComponent<Rigidbody2D>();
 
         powerUps = GetComponent<PowerUps>();
-
-        FindObjectOfType<AudioManager>().Play("flowers");
     }
 
     // Update is called once per frame
index bcfe9ca8a4e5de93ff723bf2617f0e58cd69b727..744133e7eff2876c5a6fd37a884fc5e91aa956d5 100644 (file)
@@ -20,7 +20,7 @@ TextureImporter:
     externalNormalMap: 0
     heightScale: 0.25
     normalMapFilter: 0
-  isReadable: 0
+  isReadable: 1
   streamingMipmaps: 0
   streamingMipmapsPriority: 0
   vTOnly: 0
@@ -75,6 +75,54 @@ TextureImporter:
     overridden: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Windows Store Apps
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []