Skip to content

Commit

Permalink
#2
Browse files Browse the repository at this point in the history
  • Loading branch information
washingtonwagner committed Feb 12, 2024
1 parent f88b335 commit 97f1d7c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Game/Assets/_Game/Assets/Player.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ GameObject:
- component: {fileID: 8097234193942473045}
- component: {fileID: 8097234193942473042}
- component: {fileID: 8097234193942473043}
- component: {fileID: 2998274518755878785}
m_Layer: 7
m_Name: Player
m_TagString: Player
Expand Down Expand Up @@ -185,6 +186,18 @@ MonoBehaviour:
serializedVersion: 2
m_Bits: 136
jumpHeight: 7
--- !u!114 &2998274518755878785
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097234193942473040}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c8cf347defefa0c498c3e199658f94a7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &8097234194677802117
GameObject:
m_ObjectHideFlags: 0
Expand Down
3 changes: 2 additions & 1 deletion Game/Assets/_Game/_Scripts/Damage/DeathOnDamage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public class DeathOnDamage : MonoBehaviour, IDamageble
{
public void TakeDamage(int damage)
{
Destroy(gameObject);
Debug.Log(gameObject.name + " foi atingido");
//Destroy(gameObject);
}
}
3 changes: 2 additions & 1 deletion Game/Assets/_Game/_Scripts/Enemies/BasicMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class BasicMovement : MonoBehaviour

[Header("Tests")]
private bool isRight = true;
private bool seePlayer = false;
[SerializeField] private bool seePlayer = false;
private bool onBord = false;

// Start is called before the first frame update
Expand Down Expand Up @@ -65,6 +65,7 @@ private void FindPlayer()
Vector2 playerPosition = coll.transform.position;
Vector2 direction = playerPosition - position;
RaycastHit2D hit = Physics2D.Raycast(position, direction.normalized);
Debug.Log(hit.transform.name);
if (hit.transform != null)
{
if (hit.transform.CompareTag("Player"))
Expand Down

0 comments on commit 97f1d7c

Please sign in to comment.