volume: 0.2
pitch: 1
source: {fileID: 0}
+ music: flowers
--- !u!4 &292106544
Transform:
m_ObjectHideFlags: 0
serializedVersion: 2
minMaxState: 3
scalar: 2
- minScalar: 0.5
+ minScalar: 0.0001
maxCurve:
serializedVersion: 2
m_Curve:
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}
m_NumAlphaKeys: 2
UVModule:
serializedVersion: 2
- enabled: 0
- mode: 0
+ enabled: 1
+ mode: 1
timeMode: 0
fps: 30
frameOverTime:
uvChannelMask: -1
rowMode: 1
sprites:
- - sprite: {fileID: 0}
+ - sprite: {fileID: 21300000, guid: 03f24adbe4a503442b480da2cb2e4285, type: 3}
flipU: 0
flipV: 0
VelocityModule:
m_Name:
m_EditorClassIdentifier:
speed: 36
- jumpForce: 54
+ jumpForce: 50
jumptime: 0.5
isGrounded: 0
groundcheck: {fileID: 972365582}
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>();
}
}
+ 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
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);
}
}
}
boss.bossfight = true;
mouse.GetComponent<Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeRotation;
mouse.GetComponent<MouseController>().enabled = true;
+ FindObjectOfType<AudioManager>().Play("snail_fight");
}
}
}
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
rb = GetComponent<Rigidbody2D>();
powerUps = GetComponent<PowerUps>();
-
- FindObjectOfType<AudioManager>().Play("flowers");
}
// Update is called once per frame
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
- isReadable: 0
+ isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
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: []