Compare commits

..

No commits in common. "3576b9c9425055b9a65a5180dde7cfb9280415e4" and "92218e2f68c4e73ff83dde8b06ab173a19eea399" have entirely different histories.

6 changed files with 74 additions and 130 deletions

View File

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 1930891210259786141} - component: {fileID: 1930891210259786141}
- component: {fileID: 2669453284189978930} - component: {fileID: 2669453284189978930}
- component: {fileID: 8069942137008974672} - component: {fileID: 8069942137008974672}
- component: {fileID: 1842047609192968100}
m_Layer: 7 m_Layer: 7
m_Name: Renderer m_Name: Renderer
m_TagString: Untagged m_TagString: Untagged
@ -106,6 +107,41 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1 m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0 m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0 m_WriteDefaultValuesOnDisable: 0
--- !u!58 &1842047609192968100
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1936012740462134995}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 192
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
serializedVersion: 2
m_Radius: 0.5
--- !u!1 &2470138561869876166 --- !u!1 &2470138561869876166
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -238,7 +274,6 @@ GameObject:
- component: {fileID: 1749848915408613053} - component: {fileID: 1749848915408613053}
- component: {fileID: 1949941092232239315} - component: {fileID: 1949941092232239315}
- component: {fileID: 1449424410418603396} - component: {fileID: 1449424410418603396}
- component: {fileID: 3467400445075357762}
m_Layer: 7 m_Layer: 7
m_Name: Player1 m_Name: Player1
m_TagString: Player m_TagString: Player
@ -296,9 +331,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
onlyCallZeroHealthOnce: 1
maxHealth: 100 maxHealth: 100
damageTickDelay: 0.25
OnHealthZero: OnHealthZero:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
@ -408,41 +441,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6b097a132c072b72fbc7808ebf263e52, type: 3} m_Script: {fileID: 11500000, guid: 6b097a132c072b72fbc7808ebf263e52, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!58 &3467400445075357762
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3120938410244321186}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 192
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
serializedVersion: 2
m_Radius: 0.5
--- !u!1001 &6225877037457186740 --- !u!1001 &6225877037457186740
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 1930891210259786141} - component: {fileID: 1930891210259786141}
- component: {fileID: 2669453284189978930} - component: {fileID: 2669453284189978930}
- component: {fileID: 8069942137008974672} - component: {fileID: 8069942137008974672}
- component: {fileID: 1842047609192968100}
m_Layer: 7 m_Layer: 7
m_Name: Renderer m_Name: Renderer
m_TagString: Untagged m_TagString: Untagged
@ -106,6 +107,41 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1 m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0 m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0 m_WriteDefaultValuesOnDisable: 0
--- !u!58 &1842047609192968100
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1936012740462134995}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 192
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
serializedVersion: 2
m_Radius: 0.5
--- !u!1 &3096169748286405671 --- !u!1 &3096169748286405671
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -154,7 +190,6 @@ GameObject:
- component: {fileID: 7071433868121438663} - component: {fileID: 7071433868121438663}
- component: {fileID: 1949941092232239315} - component: {fileID: 1949941092232239315}
- component: {fileID: 7729933180365677331} - component: {fileID: 7729933180365677331}
- component: {fileID: 5090706458114509519}
m_Layer: 7 m_Layer: 7
m_Name: Player2 m_Name: Player2
m_TagString: Player m_TagString: Player
@ -212,9 +247,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
onlyCallZeroHealthOnce: 1
maxHealth: 100 maxHealth: 100
damageTickDelay: 0.25
OnHealthZero: OnHealthZero:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
@ -324,41 +357,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6b097a132c072b72fbc7808ebf263e52, type: 3} m_Script: {fileID: 11500000, guid: 6b097a132c072b72fbc7808ebf263e52, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!58 &5090706458114509519
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3120938410244321186}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 192
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
serializedVersion: 2
m_Radius: 0.5
--- !u!1 &7787472247078384126 --- !u!1 &7787472247078384126
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -3294,23 +3294,6 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1655073753 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 809911508645467208, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
m_PrefabInstance: {fileID: 1683288374126251321}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1655073756
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1655073753}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cfcb795658e5b9d8bbbf6d6e238c21a0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1677146148 --- !u!1 &1677146148
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3825,10 +3808,7 @@ PrefabInstance:
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: m_AddedComponents: []
- targetCorrespondingSourceObject: {fileID: 809911508645467208, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
insertIndex: -1
addedObject: {fileID: 1655073756}
m_SourcePrefab: {fileID: 100100000, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3} m_SourcePrefab: {fileID: 100100000, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
--- !u!1001 &4910321061857220295 --- !u!1001 &4910321061857220295
PrefabInstance: PrefabInstance:

View File

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: cfcb795658e5b9d8bbbf6d6e238c21a0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -109,11 +109,8 @@ public class PlayerMovement : MonoBehaviour
void OnCollisionStay2D(Collision2D collision) void OnCollisionStay2D(Collision2D collision)
{ {
Debug.Log("Hit other " + collision.otherCollider.gameObject.name); if (collision.otherCollider.gameObject.CompareTag("Enemy"))
Debug.Log("Hit other " + collision.collider.gameObject.name);
if (collision.collider.gameObject.CompareTag("Enemy"))
{ // Other object is an enemy { // Other object is an enemy
Debug.Log("Hit enememenemy");
hp.TakeDamage(1f); hp.TakeDamage(1f);
} }
} }