mirror of
https://github.com/Kizuren/SynthMaze.git
synced 2025-12-21 21:16:08 +01:00
Changes to SharpBlock
This commit is contained in:
parent
cd1e6602a8
commit
d06eeb6603
3 changed files with 39 additions and 4 deletions
|
|
@ -67,6 +67,14 @@ public class SharpBlock : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
void OnTriggerEnter2D(Collider2D c2d)
|
||||
{
|
||||
if (c2d.CompareTag("Player"))
|
||||
{
|
||||
LevelMgr.killPlayer = true;
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator ChangeDirection()
|
||||
{
|
||||
isChangingDirection = true;
|
||||
|
|
|
|||
|
|
@ -2370,6 +2370,7 @@ GameObject:
|
|||
- component: {fileID: 406194637}
|
||||
- component: {fileID: 406194636}
|
||||
- component: {fileID: 406194635}
|
||||
- component: {fileID: 406194644}
|
||||
m_Layer: 0
|
||||
m_Name: SharpBlock
|
||||
m_TagString: Enemy
|
||||
|
|
@ -2401,7 +2402,7 @@ BoxCollider2D:
|
|||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 2, y: 2}
|
||||
m_Size: {x: 1.9, y: 1.9}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!50 &406194636
|
||||
Rigidbody2D:
|
||||
|
|
@ -2547,6 +2548,32 @@ MonoBehaviour:
|
|||
timeDelayOnHit: 3
|
||||
isMovingRightOrUp: 1
|
||||
horizontal: 0
|
||||
--- !u!61 &406194644
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 406194634}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 1
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2, y: 2}
|
||||
newSize: {x: 0.5, y: 0.5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 2.5, y: 2.5}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &417760883
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -2564,7 +2591,7 @@ GameObject:
|
|||
- component: {fileID: 417760884}
|
||||
m_Layer: 3
|
||||
m_Name: SniperGuy (1)
|
||||
m_TagString: Untagged
|
||||
m_TagString: Enemy
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
@ -9696,7 +9723,7 @@ GameObject:
|
|||
- component: {fileID: 1774596517}
|
||||
m_Layer: 3
|
||||
m_Name: SniperGuy
|
||||
m_TagString: Untagged
|
||||
m_TagString: Enemy
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class PlayerMove : MonoBehaviour
|
|||
|
||||
void OnCollisionEnter2D(Collision2D c2d)
|
||||
{
|
||||
if (c2d.gameObject.CompareTag("Ground"))
|
||||
if (c2d.gameObject.CompareTag("Ground") || c2d.gameObject.CompareTag("Enemy"))
|
||||
{
|
||||
touched++;
|
||||
//Debug.Log("Touched: " + touched);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue