Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelHerraizG committed May 25, 2024
2 parents 318aa01 + 33a2596 commit 5e68fea
Show file tree
Hide file tree
Showing 11 changed files with 187 additions and 116 deletions.
87 changes: 79 additions & 8 deletions DeliriumTest/Assets/Prefabs/Salas/SalaSecreta.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1963,6 +1963,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7763022523670997781}
- {fileID: 6344244719841327425}
m_Father: {fileID: 2786442759681321585}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!156049354 &6080249797035099043
Expand Down Expand Up @@ -2031,11 +2032,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7248133977681697861, guid: a6b336a0c6ee0604ca0ee603418194d0, type: 3}
propertyPath: m_LocalPosition.x
value: 5.55
value: 5.6
objectReference: {fileID: 0}
- target: {fileID: 7248133977681697861, guid: a6b336a0c6ee0604ca0ee603418194d0, type: 3}
propertyPath: m_LocalPosition.y
value: -7.42
value: -8
objectReference: {fileID: 0}
- target: {fileID: 7248133977681697861, guid: a6b336a0c6ee0604ca0ee603418194d0, type: 3}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -2105,11 +2106,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5021903183528127959, guid: 8161613964c52474fb64a7f2b0927f6e, type: 3}
propertyPath: m_LocalPosition.x
value: -3.5
value: -3.29
objectReference: {fileID: 0}
- target: {fileID: 5021903183528127959, guid: 8161613964c52474fb64a7f2b0927f6e, type: 3}
propertyPath: m_LocalPosition.y
value: -10
value: -9.84
objectReference: {fileID: 0}
- target: {fileID: 5021903183528127959, guid: 8161613964c52474fb64a7f2b0927f6e, type: 3}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -2171,11 +2172,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7248133977681697861, guid: a6b336a0c6ee0604ca0ee603418194d0, type: 3}
propertyPath: m_LocalPosition.x
value: -5.45
value: -6.12
objectReference: {fileID: 0}
- target: {fileID: 7248133977681697861, guid: a6b336a0c6ee0604ca0ee603418194d0, type: 3}
propertyPath: m_LocalPosition.y
value: -7.47
value: -7.68
objectReference: {fileID: 0}
- target: {fileID: 7248133977681697861, guid: a6b336a0c6ee0604ca0ee603418194d0, type: 3}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -2245,11 +2246,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5021903183528127959, guid: 8161613964c52474fb64a7f2b0927f6e, type: 3}
propertyPath: m_LocalPosition.x
value: 3.5
value: 2.77
objectReference: {fileID: 0}
- target: {fileID: 5021903183528127959, guid: 8161613964c52474fb64a7f2b0927f6e, type: 3}
propertyPath: m_LocalPosition.y
value: -9.6
value: -9.65
objectReference: {fileID: 0}
- target: {fileID: 5021903183528127959, guid: 8161613964c52474fb64a7f2b0927f6e, type: 3}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -2293,3 +2294,73 @@ Transform:
m_CorrespondingSourceObject: {fileID: 5021903183528127959, guid: 8161613964c52474fb64a7f2b0927f6e, type: 3}
m_PrefabInstance: {fileID: 5668503851053422389}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8947766638035283386
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 6549613275946161950}
m_Modifications:
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalScale.x
value: 8.9749
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalPosition.x
value: 8.53
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalPosition.y
value: -10.4276
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalRotation.z
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 90
objectReference: {fileID: 0}
- target: {fileID: 6010307990909652271, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_Name
value: Borde izq
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
--- !u!4 &6344244719841327425 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
m_PrefabInstance: {fileID: 8947766638035283386}
m_PrefabAsset: {fileID: 0}
79 changes: 15 additions & 64 deletions DeliriumTest/Assets/Scenes/ProcPrueba.unity
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Transform:
m_GameObject: {fileID: 15361921}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 63.86, y: -5.1, z: 0}
m_LocalPosition: {x: 63.86, y: -4.9, z: 0}
m_LocalScale: {x: 14.8, y: 0.1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -924,30 +924,6 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 576006473808133625, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.x
value: -3.29
objectReference: {fileID: 0}
- target: {fileID: 576006473808133625, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.y
value: -9.84
objectReference: {fileID: 0}
- target: {fileID: 800497716833680098, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.x
value: 2.77
objectReference: {fileID: 0}
- target: {fileID: 800497716833680098, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.y
value: -9.65
objectReference: {fileID: 0}
- target: {fileID: 2389703891897445313, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.x
value: -6.12
objectReference: {fileID: 0}
- target: {fileID: 2389703891897445313, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.y
value: -7.68
objectReference: {fileID: 0}
- target: {fileID: 2786442759681321585, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.x
value: 64
Expand Down Expand Up @@ -988,48 +964,19 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5062982250300529083, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
- target: {fileID: 6344244719841327425, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalScale.x
value: 1
value: 9.4
objectReference: {fileID: 0}
- target: {fileID: 5062982250300529083, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5062982250300529083, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.x
value: 5.6
objectReference: {fileID: 0}
- target: {fileID: 5062982250300529083, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.y
value: -8
objectReference: {fileID: 0}
- target: {fileID: 6549613275946161950, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
- target: {fileID: 6344244719841327425, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_LocalPosition.y
value: 0
value: -10.2876
objectReference: {fileID: 0}
- target: {fileID: 6976446162861396148, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_Name
value: SalaSecreta (1)
objectReference: {fileID: 0}
- target: {fileID: 8776038891167927044, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_Points.Array.data[4].x
value: 8.029036
objectReference: {fileID: 0}
- target: {fileID: 8776038891167927044, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_Points.Array.data[4].y
value: -4.982457
objectReference: {fileID: 0}
- target: {fileID: 8776038891167927044, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_Points.Array.data[5].x
value: 3.6631303
objectReference: {fileID: 0}
- target: {fileID: 8776038891167927044, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
propertyPath: m_Points.Array.data[5].y
value: -4.9406023
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 8776038891167927044, guid: 1283ffad7c1690c4082e0e5cafd69bff, type: 3}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
Expand Down Expand Up @@ -1228,6 +1175,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalScale.y
value: 0.55000013
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalPosition.x
value: 8.25
Expand All @@ -1246,11 +1197,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalRotation.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalRotation.y
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalRotation.z
Expand Down Expand Up @@ -1822,7 +1773,7 @@ MonoBehaviour:
chapas: {fileID: 4601169436654983355, guid: 8ead7f76a9d45f44493dba858c02dd86, type: 3}
kebab: {fileID: 8854965878747412021, guid: 3a76e24bb65194d43b47a4c3898939cd, type: 3}
energetica: {fileID: 7288655054274534137, guid: ff1a6705f4a31054b8d1f12067e0deaf, type: 3}
_timer: 0
_timer: 0.75
--- !u!1 &885782566
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1995,7 +1946,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalPosition.y
value: -5.25
value: -5.2
objectReference: {fileID: 0}
- target: {fileID: 2605212177013216507, guid: 8ebd7ae5fcc44ff4eaf82f6f06d8ee27, type: 3}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -3749,7 +3700,7 @@ Camera:
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
Expand Down
9 changes: 9 additions & 0 deletions DeliriumTest/Assets/Scripts/AudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static AudioManager Instance
/// </summary>
[SerializeField] private AudioClip _menuMusic;
[SerializeField] private AudioClip _gameMusic;
[SerializeField] private AudioClip _bossMusic;

/// <summary>
/// Efectos de Sonido del Jugador
Expand Down Expand Up @@ -158,5 +159,13 @@ public void LevelMusic()
Music.Play();
}

/// <summary>
/// Se reproduce la canción del nivel
/// </summary>
public void BossMusic()
{
Music.clip = _bossMusic;
Music.Play();
}

}
16 changes: 9 additions & 7 deletions DeliriumTest/Assets/Scripts/Boss/BossHealth.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

Expand Down Expand Up @@ -37,7 +34,12 @@ private void OnDestroy()
{
//Desactiva la barra de vida e indica que el boss a sido derrotado
LevelManager.levelManager.EnemyDefeated(GetComponent<BossController>());
_healthBar.GetComponentInParent<Canvas>().enabled = false;
Canvas Health = _healthBar.GetComponentInParent<Canvas>();
if (Health != null)
{
Health.enabled = false;
}

}
private void Awake()
{
Expand All @@ -59,9 +61,9 @@ private void Update()
bossHealth = _bossHealth.Health;
_healthBar.value = bossHealth;
_healthBar.GetComponentInParent<Canvas>().enabled = GetComponent<BossController>().enabled;

//Si el boss muere lo destruye
if(_bossHealth.Health <= 0)
if (_bossHealth.Health <= 0)
{
Destroy(gameObject);
}
Expand All @@ -72,7 +74,7 @@ private void Update()
/// </summary>
private void RegisterLife()
{
bossMaxHealth = _bossHealth.MaxHealth;
bossMaxHealth = _bossHealth.MaxHealth;
_healthBar.maxValue = bossMaxHealth;
}
}
1 change: 1 addition & 0 deletions DeliriumTest/Assets/Scripts/Boss/BossMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ private void Awake()
}
private void Start()
{
AudioManager.Instance.BossMusic();
boxCollider = GetComponent<BoxCollider2D>();
rb = GetComponent<Rigidbody2D>();
animator = GetComponent<Animator>();
Expand Down
19 changes: 12 additions & 7 deletions DeliriumTest/Assets/Scripts/BulletComponent.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BulletComponent : MonoBehaviour
Expand All @@ -12,16 +10,23 @@ public class BulletComponent : MonoBehaviour
// Start is called before the first frame update
void Start()
{
_rigidBody = GetComponent<Rigidbody2D>();
_rigidBody = GetComponent<Rigidbody2D>();
}
/// <summary>
/// Se llama al instanciarse la bala. Setea su dirección con el vector direction.
/// Se llama al instanciarse la bala.
/// Establece su dirección con el vector direction.
/// Rota desde su izquierda hacia la dirección en la que es propulsado en el eje z.
/// </summary>
/// <param name="direction"></param>
public void RegisterVector(Vector3 direction)
{
_speed = direction;

transform.rotation = Quaternion.FromToRotation(Vector3.right,direction);
//Por si hay alguna rotación en los ejes x o y lo eliminamos para evitar que se
//aplanen los proyectiles.
transform.rotation = new Quaternion(0f,0f,transform.rotation.z,transform.rotation.w);
_speed = direction;

}
/// <summary>
/// El objeto al colisionar con el personaje, los enemigos o los bordes, se destruye
Expand Down Expand Up @@ -50,8 +55,8 @@ private void OnCollisionStay2D(Collision2D collision)
/// </summary>
void FixedUpdate()
{

_rigidBody.velocity = _speed * 10f * _bulletSpeed * Time.fixedDeltaTime;

}
}
Loading

0 comments on commit 5e68fea

Please sign in to comment.