Sorpresas de ultima hora

parent 8a49e5aa
Showing with 146 additions and 75 deletions
fileFormatVersion: 2
guid: 633ecd89aaf9c6b4b8c18a4449c603e6
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: d662b337c3d0cde49a99c9f9848c8128
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 99fe640669a7b85468da896f65a17592
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
......@@ -56,27 +56,6 @@ public class Enemigo1Move : MonoBehaviour
private void OnTriggerEnter2D(Collider2D collision)
{
// if (collision.tag == "BalaGuitarra")
// {
// vida--;
// if(vida == 0) { //Como lo ponga menor o igual a 0 puede detectar como que has matado a dos enemigos en vez de solo a uno si disparas muy cerca. Por eso mejor ==
// Destroy(collision.gameObject);
// //Aqui se cuenta cuantos enemigos quedan para entregar el coleccionable que te dan por derrotar a todos los enemigos
// if (Coleccionables.eDerrotados[Coleccionables.niActual] != Coleccionables.eTotales[Coleccionables.niActual])
// {
// if (Coleccionables.eDerrotados[Coleccionables.niActual] == Coleccionables.eTotales[Coleccionables.niActual] - 1)
// {
// //AQUI SE INSTANCIA EL PREFAB DEL COLECCIONABLE
// Instantiate(prefabColeccionable, collision.transform.position, Quaternion.identity);
// }
// Coleccionables.eDerrotados[Coleccionables.niActual]++;
// }
// Destroy(this.gameObject);
// }
// }
if (collision.tag == "BalaFlauta")
{
......@@ -86,6 +65,11 @@ public class Enemigo1Move : MonoBehaviour
{
Destroy(collision.gameObject);
//Efecto de sonido de muerte de pajaro
AudioSource audio = GameObject.Find("Efectos").GetComponent<AudioSource>();
AudioClip clip = Resources.Load("Musica/EfectosSonido/pajaroDerrotado") as AudioClip;
audio.PlayOneShot(clip, 0.2f);
//Aqui se cuenta cuantos enemigos quedan para entregar el coleccionable que te dan por derrotar a todos los enemigos
if (Coleccionables.eDerrotados[Coleccionables.niActual] != Coleccionables.eTotales[Coleccionables.niActual])
{
......
......@@ -65,8 +65,14 @@ public class Enemigo2Move : MonoBehaviour
if (vida == 0)
{ //Como lo ponga menor o igual a 0 puede detectar como que has matado a dos enemigos en vez de solo a uno si disparas muy cerca. Por eso mejor ==
Destroy(collision.gameObject);
//Efecto de sonido de muerte de pajaro
AudioSource audio = GameObject.Find("Efectos").GetComponent<AudioSource>();
AudioClip clip = Resources.Load("Musica/EfectosSonido/pajaroDerrotado") as AudioClip;
audio.PlayOneShot(clip, 0.2f);
//Aqui se cuenta cuantos enemigos quedan para entregar el coleccionable que te dan por derrotar a todos los enemigos
if (Coleccionables.eDerrotados[Coleccionables.niActual] != Coleccionables.eTotales[Coleccionables.niActual])
{
......@@ -82,28 +88,6 @@ public class Enemigo2Move : MonoBehaviour
}
}
//if (collision.tag == "BalaFlauta")
//{
// vida--;
// if (vida == 0)
// {
// Destroy(collision.gameObject);
// //Aqui se cuenta cuantos enemigos quedan para entregar el coleccionable que te dan por derrotar a todos los enemigos
// if (Coleccionables.eDerrotados[Coleccionables.niActual] != Coleccionables.eTotales[Coleccionables.niActual])
// {
// if (Coleccionables.eDerrotados[Coleccionables.niActual] == Coleccionables.eTotales[Coleccionables.niActual] - 1)
// {
// //AQUI SE INSTANCIA EL PREFAB DEL COLECCIONABLE
// Instantiate(prefabColeccionable, collision.transform.position, Quaternion.identity);
// }
// Coleccionables.eDerrotados[Coleccionables.niActual]++;
// }
// Destroy(this.gameObject);
// }
//}
if (collision.tag == "HitBoxMelee")
{
......
......@@ -93,6 +93,7 @@ public class Jugador : MonoBehaviour
public void Muerte()
{
//El jugador muere
Musica.CancionDerrota();
Time.timeScale = 0;
canvasMuerte.gameObject.SetActive(true);
Debug.Log("Muerte");
......
......@@ -79,6 +79,37 @@ public class Musica : MonoBehaviour
}
}
public static void CancionFinal()
{
//Cambiamos el audio y ajustamos el volumen.
AudioSource audio = musica.GetComponent<AudioSource>();
if (!audio.clip.name.Equals("MusicTales_MenuInicial"))
{
audio.clip = Resources.Load("Musica/Juego/MusicTales_Fanfarria") as AudioClip;
audio.volume = 1;
audio.Play();
}
}
public static void CancionDerrota()
{
//Cambiamos el audio y ajustamos el volumen.
AudioSource audio = musica.GetComponent<AudioSource>();
if (!audio.clip.name.Equals("MusicTales_MenuInicial"))
{
audio.clip = Resources.Load("Musica/Juego/MusicTales_Derrota") as AudioClip;
audio.volume = 1;
audio.PlayOneShot(audio.clip,0.4f);
}
}
public static void Parar()
{
......
......@@ -13,7 +13,7 @@ public class ReproducirExtra : MonoBehaviour
reproducir = GameObject.Find("Reproducir").GetComponent<Button>();
reproducir.onClick.AddListener(PararMusica);
reproducir = GameObject.Find("ButtonBack").GetComponent<Button>();
reproducir.onClick.AddListener(ContinuarMusica);
volver.onClick.AddListener(ContinuarMusica);
}
public void PararMusica()
......
......@@ -30,7 +30,12 @@ public class ZonaFinal : MonoBehaviour
private void OnTriggerEnter2D(Collider2D collision)
{
if(collision.gameObject.tag == "Player") {
if(collision.gameObject.tag == "Player") {
//Cancion de final de nivel
Musica.CancionFinal();
//Guardar datos
GuardarYCargar.Guardar(colecto, "slotColeccionables");
//Si el jugador entra aqui significa que se ha pasado el nivel. Parar el tiempo de juego,
......
......@@ -21,7 +21,7 @@ MonoBehaviour:
m_ShowMode: 4
m_Title:
m_RootView: {fileID: 6}
m_MinSize: {x: 950, y: 544}
m_MinSize: {x: 950, y: 300}
m_MaxSize: {x: 10000, y: 10000}
--- !u!114 &2
MonoBehaviour:
......@@ -44,10 +44,10 @@ MonoBehaviour:
y: 30
width: 1920
height: 947
m_MinSize: {x: 681, y: 494}
m_MaxSize: {x: 14002, y: 14044}
m_MinSize: {x: 683, y: 494}
m_MaxSize: {x: 14004, y: 14044}
vertical: 0
controlID: 13
controlID: 58
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
......@@ -67,8 +67,8 @@ MonoBehaviour:
y: 0
width: 331
height: 947
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 277, y: 72}
m_MaxSize: {x: 4002, y: 4022}
m_ActualView: {fileID: 14}
m_Panes:
- {fileID: 14}
......@@ -93,8 +93,8 @@ MonoBehaviour:
y: 0
width: 341
height: 630
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 202, y: 222}
m_MaxSize: {x: 4002, y: 4022}
m_ActualView: {fileID: 15}
m_Panes:
- {fileID: 15}
......@@ -219,7 +219,7 @@ MonoBehaviour:
m_MinSize: {x: 406, y: 494}
m_MaxSize: {x: 10002, y: 14044}
vertical: 1
controlID: 14
controlID: 59
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
......@@ -244,7 +244,7 @@ MonoBehaviour:
m_MinSize: {x: 406, y: 222}
m_MaxSize: {x: 8006, y: 4022}
vertical: 0
controlID: 15
controlID: 60
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
......@@ -300,7 +300,7 @@ MonoBehaviour:
m_ViewDataDictionary: {fileID: 0}
m_LockTracker:
m_IsLocked: 0
m_LastSelectedObjectID: -32362
m_LastSelectedObjectID: -28596
--- !u!114 &13
MonoBehaviour:
m_ObjectHideFlags: 52
......@@ -339,34 +339,34 @@ MonoBehaviour:
m_ShowAllHits: 0
m_SearchArea: 1
m_Folders:
- Assets/Prefabs
- Assets/Scenes
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- Assets/Prefabs
- Assets/Scenes
m_LastFoldersGridSize: -1
m_LastProjectPath: C:\Users\alvmo\Documents\NetBeansProjects\DesarrolloDeVideojuegos_Proyecto\Videojuegos_Proyecto
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: d0370000
m_LastClickedID: 14288
m_ExpandedIDs: 00000000f62c000052360000d036000000ca9a3b
scrollPos: {x: 0, y: 42}
m_SelectedIDs: 6e2b0000
m_LastClickedID: 11118
m_ExpandedIDs: 00000000862a0000f83300007c3400005435000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name: Animaciones
m_OriginalName: Animaciones
m_Name:
m_OriginalName:
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: 13550
m_UserData: 0
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 5}
m_SearchString:
......@@ -380,7 +380,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000f62c000052360000
m_ExpandedIDs: 00000000862a0000f83300007c340000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
......@@ -500,9 +500,9 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 802d0000
m_SelectedIDs: 38330000
m_LastClickedID: 0
m_ExpandedIDs: 6639ffff2a8ffffffaf6ffffa6f8ffff
m_ExpandedIDs: 1872f8ffc8e1f8ff3289faff3c6dfdffa2d6fdffa240feff9cb2feffb08affff02f9ffff8cfbfffff4ffffffea96010090990100
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
......@@ -562,9 +562,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: -9.568136, y: -1.3873407, z: -0.04989327}
m_Target: {x: 49.474472, y: 10.983011, z: -0.1000061}
speed: 2
m_Value: {x: -9.568136, y: -1.3873407, z: -0.04989327}
m_Value: {x: 49.474472, y: 10.983011, z: -0.1000061}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
......@@ -597,9 +597,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 4.0349092
m_Target: 62.71813
speed: 2
m_Value: 4.0349092
m_Value: 62.71813
m_Ortho:
m_Target: 1
speed: 2
......
{"cameraMode":{"drawMode":0,"name":"Shaded","section":"Shading Mode"},"sceneLighting":true,"audioPlay":false,"sceneViewState":{"showFog":true,"showMaterialUpdate":false,"showSkybox":true,"showFlares":true,"showImageEffects":true,"showParticleSystems":true},"in2DMode":true,"pivot":{"x":-9.568136215209961,"y":-1.3873406648635865,"z":-0.049893271178007129},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0},"size":4.034909248352051,"orthographic":true}
\ No newline at end of file
{"cameraMode":{"drawMode":0,"name":"Shaded","section":"Shading Mode"},"sceneLighting":true,"audioPlay":false,"sceneViewState":{"showFog":true,"showMaterialUpdate":false,"showSkybox":true,"showFlares":true,"showImageEffects":true,"showParticleSystems":true},"in2DMode":true,"pivot":{"x":49.47447204589844,"y":10.983011245727539,"z":-0.100006103515625},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0},"size":62.7181282043457,"orthographic":true}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment