From f7042cdd2baef28b3fed45ec98ab1e8683597f99 Mon Sep 17 00:00:00 2001 From: Tucan444 Date: Tue, 20 Jul 2021 20:36:16 +0200 Subject: [PATCH] _ --- Assets/Scenes/SampleScene.unity | 4 ++-- Assets/Scripts/Death.cs | 19 ++++++------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 307c77a..4efe76f 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -639,8 +639,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1419812560} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 3.7088284, y: -10.5, z: 0.70835644} - m_LocalScale: {x: 17.397755, y: 1.9050395, z: 1} + m_LocalPosition: {x: 17.7342, y: -10.9912, z: 0.70835644} + m_LocalScale: {x: 101.93455, y: 0.9226782, z: 1} m_Children: [] m_Father: {fileID: 8146526} m_RootOrder: 3 diff --git a/Assets/Scripts/Death.cs b/Assets/Scripts/Death.cs index f933747..d21c7f1 100644 --- a/Assets/Scripts/Death.cs +++ b/Assets/Scripts/Death.cs @@ -4,21 +4,14 @@ using UnityEngine; public class Death : MonoBehaviour - { - // Start is called before the first frame update - void Start() - { - + + void Start() { + Debug.Log("hello"); } - - // Update is called once per frame - void Update() + private void OnCollisionEnter2D (Collision2D collisionInfo) { - - } - - public void OnCollisionEnter(){ - Debug.Log("B"); + Debug.Log(collisionInfo.collider.transform); + collisionInfo.collider.transform.position = Vector3.zero; } }