Made presser open and close

This commit is contained in:
2026-04-21 22:44:44 +01:00
parent 164b9699d3
commit 289396c0ea
3 changed files with 40 additions and 11 deletions

View File

@@ -224,6 +224,13 @@ AnimationClip:
intParameter: 0 intParameter: 0
messageOptions: 0 messageOptions: 0
- time: 0.55 - time: 0.55
functionName: OpenBottom
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 0.6666667
functionName: CloseBottom functionName: CloseBottom
data: data:
objectReferenceParameter: {fileID: 0} objectReferenceParameter: {fileID: 0}

View File

@@ -211,7 +211,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!61 &2714168551213278428 --- !u!61 &2714168551213278428
BoxCollider2D: BoxCollider2D:
@@ -293,7 +293,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!61 &2448787661920129587 --- !u!61 &2448787661920129587
BoxCollider2D: BoxCollider2D:
@@ -375,7 +375,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!61 &8580655252957421185 --- !u!61 &8580655252957421185
BoxCollider2D: BoxCollider2D:
@@ -421,7 +421,7 @@ BoxCollider2D:
drawMode: 0 drawMode: 0
adaptiveTiling: 0 adaptiveTiling: 0
m_AutoTiling: 0 m_AutoTiling: 0
m_Size: {x: 120, y: 1} m_Size: {x: 120, y: 12}
m_EdgeRadius: 0 m_EdgeRadius: 0
--- !u!1 &8718160904021803034 --- !u!1 &8718160904021803034
GameObject: GameObject:
@@ -457,7 +457,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!61 &7980248264564719518 --- !u!61 &7980248264564719518
BoxCollider2D: BoxCollider2D:

View File

@@ -33,11 +33,33 @@ namespace Fruitomation.Game
} }
} }
[Preserve, UsedImplicitly] public void OpenTop() => TopCollider.enabled = false; [Preserve, UsedImplicitly]
[Preserve, UsedImplicitly] public void CloseTop() => TopCollider.enabled = true; public void OpenTop()
{
Debug.Log(nameof(OpenTop));
TopCollider.enabled = false;
}
[Preserve, UsedImplicitly] public void OpenBottom() => BottomCollider.enabled = false; [Preserve, UsedImplicitly]
[Preserve, UsedImplicitly] public void CloseBottom() => BottomCollider.enabled = true; public void CloseTop()
{
Debug.Log(nameof(CloseTop));
TopCollider.enabled = true;
}
[Preserve, UsedImplicitly]
public void OpenBottom()
{
Debug.Log(nameof(OpenBottom));
BottomCollider.enabled = false;
}
[Preserve, UsedImplicitly]
public void CloseBottom()
{
Debug.Log(nameof(CloseBottom));
BottomCollider.enabled = true;
}
[Preserve, UsedImplicitly] public void Press() [Preserve, UsedImplicitly] public void Press()
{ {