Small fixes
This commit is contained in:
@@ -1386,7 +1386,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 5636027701359458481}
|
m_GameObject: {fileID: 5636027701359458481}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 36, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ BoxCollider2D:
|
|||||||
drawMode: 0
|
drawMode: 0
|
||||||
adaptiveTiling: 0
|
adaptiveTiling: 0
|
||||||
m_AutoTiling: 0
|
m_AutoTiling: 0
|
||||||
m_Size: {x: 0.99981785, y: 0.056192875}
|
m_Size: {x: 0.9974469, y: 0.056192875}
|
||||||
m_EdgeRadius: 0
|
m_EdgeRadius: 0
|
||||||
--- !u!114 &5094694631672972304
|
--- !u!114 &5094694631672972304
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class FallPlatform : MonoBehaviour
|
|||||||
}
|
}
|
||||||
private void OnTriggerEnter2D(Collider2D collision)
|
private void OnTriggerEnter2D(Collider2D collision)
|
||||||
{
|
{
|
||||||
if (!falling && collision.gameObject.CompareTag("Player"))
|
if (!falling/* && collision.gameObject.CompareTag("Player")*/)
|
||||||
{
|
{
|
||||||
StartCoroutine(FallAfterDelay());
|
StartCoroutine(FallAfterDelay());
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,7 @@ public class FallPlatform : MonoBehaviour
|
|||||||
falling = true;
|
falling = true;
|
||||||
yield return new WaitForSeconds(fallDelay);
|
yield return new WaitForSeconds(fallDelay);
|
||||||
rb.bodyType = RigidbodyType2D.Dynamic;
|
rb.bodyType = RigidbodyType2D.Dynamic;
|
||||||
Destroy(gameObject, destroyDelay);
|
yield return new WaitForSeconds(destroyDelay);
|
||||||
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user