Arreglo menor

parent 7e5bdb2b
Showing with 100 additions and 39 deletions
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
public class CambioCancion : MonoBehaviour public class CambioCancion : MonoBehaviour
{ {
private void Awake() private void Awake()
{ {
Musica.CambiarCancion(); if (SceneManager.GetActiveScene().name == "SampleScene")
{
Musica.CancionNivel1();
}else if(SceneManager.GetActiveScene().name == "SampleScene")
{
Musica.CancionMenuInicial();
}
} }
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
......
...@@ -546,6 +546,49 @@ MonoBehaviour: ...@@ -546,6 +546,49 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 58d5adfa0c93ba04d92e7b5bd7b4a679, type: 3} m_Script: {fileID: 11500000, guid: 58d5adfa0c93ba04d92e7b5bd7b4a679, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &581815968
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 581815970}
- component: {fileID: 581815969}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &581815969
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 581815968}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 379826b7faee1344895a77dab75ab357, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &581815970
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 581815968}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 28.230677, y: -5.145041, z: -82.35156}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &667592360 --- !u!1 &667592360
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -55,7 +55,7 @@ public class Musica : MonoBehaviour ...@@ -55,7 +55,7 @@ public class Musica : MonoBehaviour
} }
//Declaramos como estático para poder llamar desde otros scripts. //Declaramos como estático para poder llamar desde otros scripts.
public static void CambiarCancion() public static void CancionNivel1()
{ {
//Cambiamos el audio y ajustamos el volumen. //Cambiamos el audio y ajustamos el volumen.
AudioSource audio = musica.GetComponent<AudioSource>(); AudioSource audio = musica.GetComponent<AudioSource>();
...@@ -66,5 +66,16 @@ public class Musica : MonoBehaviour ...@@ -66,5 +66,16 @@ public class Musica : MonoBehaviour
audio.Play(); audio.Play();
} }
public static void CancionMenuInicial()
{
//Cambiamos el audio y ajustamos el volumen.
AudioSource audio = musica.GetComponent<AudioSource>();
audio.clip = Resources.Load("Musica/Juego/MusicTales_MenuInicial") as AudioClip;
audio.volume = 0.2f;
audio.Play();
}
} }
...@@ -21,7 +21,7 @@ MonoBehaviour: ...@@ -21,7 +21,7 @@ MonoBehaviour:
m_ShowMode: 4 m_ShowMode: 4
m_Title: m_Title:
m_RootView: {fileID: 6} m_RootView: {fileID: 6}
m_MinSize: {x: 950, y: 300} m_MinSize: {x: 950, y: 544}
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
--- !u!114 &2 --- !u!114 &2
MonoBehaviour: MonoBehaviour:
...@@ -44,10 +44,10 @@ MonoBehaviour: ...@@ -44,10 +44,10 @@ MonoBehaviour:
y: 30 y: 30
width: 1366 width: 1366
height: 635 height: 635
m_MinSize: {x: 681, y: 344} m_MinSize: {x: 679, y: 494}
m_MaxSize: {x: 12006, y: 8044} m_MaxSize: {x: 14002, y: 14044}
vertical: 0 vertical: 0
controlID: 97 controlID: 95
--- !u!114 &3 --- !u!114 &3
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
...@@ -93,8 +93,8 @@ MonoBehaviour: ...@@ -93,8 +93,8 @@ MonoBehaviour:
y: 0 y: 0
width: 285 width: 285
height: 359 height: 359
m_MinSize: {x: 202, y: 222} m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4002, y: 4022} m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 15} m_ActualView: {fileID: 15}
m_Panes: m_Panes:
- {fileID: 15} - {fileID: 15}
...@@ -119,15 +119,15 @@ MonoBehaviour: ...@@ -119,15 +119,15 @@ MonoBehaviour:
y: 359 y: 359
width: 977 width: 977
height: 276 height: 276
m_MinSize: {x: 102, y: 122} m_MinSize: {x: 232, y: 272}
m_MaxSize: {x: 4002, y: 4022} m_MaxSize: {x: 10002, y: 10022}
m_ActualView: {fileID: 18} m_ActualView: {fileID: 13}
m_Panes: m_Panes:
- {fileID: 13} - {fileID: 13}
- {fileID: 18} - {fileID: 18}
- {fileID: 12} - {fileID: 12}
m_Selected: 1 m_Selected: 0
m_LastSelected: 0 m_LastSelected: 1
--- !u!114 &6 --- !u!114 &6
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
...@@ -216,10 +216,10 @@ MonoBehaviour: ...@@ -216,10 +216,10 @@ MonoBehaviour:
y: 0 y: 0
width: 977 width: 977
height: 635 height: 635
m_MinSize: {x: 406, y: 344} m_MinSize: {x: 404, y: 494}
m_MaxSize: {x: 8006, y: 8044} m_MaxSize: {x: 10002, y: 14044}
vertical: 1 vertical: 1
controlID: 32 controlID: 36
--- !u!114 &10 --- !u!114 &10
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
...@@ -241,10 +241,10 @@ MonoBehaviour: ...@@ -241,10 +241,10 @@ MonoBehaviour:
y: 0 y: 0
width: 977 width: 977
height: 359 height: 359
m_MinSize: {x: 406, y: 222} m_MinSize: {x: 404, y: 222}
m_MaxSize: {x: 8006, y: 4022} m_MaxSize: {x: 8004, y: 4022}
vertical: 0 vertical: 0
controlID: 33 controlID: 37
--- !u!114 &11 --- !u!114 &11
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
...@@ -293,14 +293,14 @@ MonoBehaviour: ...@@ -293,14 +293,14 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 292
y: 646 y: 1512
width: 1531 width: 977
height: 355 height: 257
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_LastSelectedObjectID: -434222 m_LastSelectedObjectID: -51572
--- !u!114 &13 --- !u!114 &13
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
...@@ -339,34 +339,34 @@ MonoBehaviour: ...@@ -339,34 +339,34 @@ MonoBehaviour:
m_ShowAllHits: 0 m_ShowAllHits: 0
m_SearchArea: 1 m_SearchArea: 1
m_Folders: m_Folders:
- Assets/Scenes - Assets/Prefabs
m_ViewMode: 1 m_ViewMode: 1
m_StartGridSize: 64 m_StartGridSize: 64
m_LastFolders: m_LastFolders:
- Assets/Scenes - Assets/Prefabs
m_LastFoldersGridSize: -1 m_LastFoldersGridSize: -1
m_LastProjectPath: C:\Users\alvmo\Documents\NetBeansProjects\DesarrolloDeVideojuegos_Proyecto\Videojuegos_Proyecto m_LastProjectPath: C:\Users\alvmo\Documents\NetBeansProjects\DesarrolloDeVideojuegos_Proyecto\Videojuegos_Proyecto
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: 1c390000 m_SelectedIDs: a8350000
m_LastClickedID: 14620 m_LastClickedID: 13736
m_ExpandedIDs: 00000000403800009841000000ca9a3b m_ExpandedIDs: 00000000cc2a00002834000000ca9a3b
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: Scenes m_Name:
m_OriginalName: Scenes m_OriginalName:
m_EditFieldRect: m_EditFieldRect:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 0 width: 0
height: 0 height: 0
m_UserData: 14620 m_UserData: 0
m_IsWaitingForDelay: 0 m_IsWaitingForDelay: 0
m_IsRenaming: 0 m_IsRenaming: 0
m_OriginalEventType: 0 m_OriginalEventType: 11
m_IsRenamingFilename: 1 m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 5} m_ClientGUIView: {fileID: 5}
m_SearchString: m_SearchString:
...@@ -380,7 +380,7 @@ MonoBehaviour: ...@@ -380,7 +380,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
m_LastClickedID: 0 m_LastClickedID: 0
m_ExpandedIDs: 000000004038000098410000 m_ExpandedIDs: 00000000cc2a000028340000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
...@@ -405,8 +405,8 @@ MonoBehaviour: ...@@ -405,8 +405,8 @@ MonoBehaviour:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_ResourceFile: m_ResourceFile:
m_ListAreaState: m_ListAreaState:
m_SelectedInstanceIDs: d25ff9ff m_SelectedInstanceIDs:
m_LastClickedInstanceID: -434222 m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 1 m_HadKeyboardFocusLastEvent: 1
m_ExpandedInstanceIDs: c6230000a83200001c2c0000462b00004afc000000000000 m_ExpandedInstanceIDs: c6230000a83200001c2c0000462b00004afc000000000000
m_RenameOverlay: m_RenameOverlay:
...@@ -500,9 +500,9 @@ MonoBehaviour: ...@@ -500,9 +500,9 @@ MonoBehaviour:
m_SceneHierarchy: m_SceneHierarchy:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: d25ff9ff m_SelectedIDs: 8c36ffff
m_LastClickedID: -434222 m_LastClickedID: -51572
m_ExpandedIDs: d45ff9ff9ebff9ff541ffaff0220faffae81faff04e2faff4242fbff0830fdff92f9fdff542cfeff5c59feff9a59feff02b9feff5e18ffffba77ffff7aabffff82d8fffff4ffffff665c00008e5c0000b0670000 m_ExpandedIDs: e0faffff
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
......
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